Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(e2e): align snapshot period #1922

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions e2e/app/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (

// snapshotCacheMB increases the default snapshot cache size of 102MB.
// This is required to support SnapSync since it must overlap with cosmos which
// takes snapshots every 1000 blocks.
const snapshotCacheMB = 2 * 1024
// takes snapshots every 100 blocks.
const snapshotCacheMB = 1024

// WriteAllConfig writes all the geth config files for all omniEVMs.
func WriteAllConfig(testnet types.Testnet, genesis core.Genesis) error {
Expand Down
2 changes: 1 addition & 1 deletion halo/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ func getTrustHeightAndHash(ctx context.Context, cl *rpchttp.HTTP) (int64, string
}

// Truncate height to last defaultSnapshotPeriod
const defaultSnapshotPeriod int64 = 1000
const defaultSnapshotPeriod int64 = 100
snapshotHeight := defaultSnapshotPeriod * (latest.Block.Height / defaultSnapshotPeriod)

if snapshotHeight == 0 {
Expand Down
2 changes: 1 addition & 1 deletion halo/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
executionGenesisFile = "execution_genesis.json"

DefaultHomeDir = "./halo" // Defaults to "halo" in current directory
defaultSnapshotInterval = 100 // Roughly once an hour (given 3s blocks)
defaultSnapshotInterval = 100 // Can't be too large, must overlap with geth snapshotcache.
defaultSnapshotKeepRecent = 2
defaultMinRetainBlocks = 1 // Prune all blocks by default, Cosmsos will still respect other needs like snapshots

Expand Down
Loading