From b9a1c7fab3a5e9dd248d858488546d48eabb40b0 Mon Sep 17 00:00:00 2001 From: corver Date: Thu, 19 Sep 2024 16:35:31 +0200 Subject: [PATCH] ci(e2e): align snapshot period --- e2e/app/geth/config.go | 4 ++-- halo/cmd/init.go | 2 +- halo/config/config.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/app/geth/config.go b/e2e/app/geth/config.go index 4312dc5d7..647eaa850 100644 --- a/e2e/app/geth/config.go +++ b/e2e/app/geth/config.go @@ -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 { diff --git a/halo/cmd/init.go b/halo/cmd/init.go index a91dff3ea..321fd3c3d 100644 --- a/halo/cmd/init.go +++ b/halo/cmd/init.go @@ -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 { diff --git a/halo/config/config.go b/halo/config/config.go index 00ac2c4ed..5d1b2b12d 100644 --- a/halo/config/config.go +++ b/halo/config/config.go @@ -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