Skip to content

Commit

Permalink
Update configs tests, add FastSyncCatchUpHeightDelta for holesky (#6431)
Browse files Browse the repository at this point in the history
* adjust config tests

* add high FastSyncCatchUpHeightDelta for holesky

* fix one more test
  • Loading branch information
marcindsobczak authored Dec 28, 2023
1 parent fe807bb commit dd613af
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
9 changes: 4 additions & 5 deletions src/Nethermind/Nethermind.Config.Test/ConfigFileTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ protected IEnumerable<string> ChiadoConfigs
protected IEnumerable<string> GoerliConfigs
=> Configs.Where(config => config.Contains("goerli"));

[ConfigFileGroup("kovan")]
protected IEnumerable<string> KovanConfigs
=> Configs.Where(config => config.Contains("kovan"));
[ConfigFileGroup("holesky")]
protected IEnumerable<string> HoleskyConfigs
=> Configs.Where(config => config.Contains("holesky"));

[ConfigFileGroup("spaceneth")]
protected IEnumerable<string> SpacenethConfigs
Expand All @@ -103,8 +103,7 @@ protected IEnumerable<string> AuraConfigs
.Union(GnosisConfigs)
.Union(ChiadoConfigs)
.Union(VoltaConfigs)
.Union(EnergyConfigs)
.Union(KovanConfigs);
.Union(EnergyConfigs);

[ConfigFileGroup("aura_non_validating")]
protected IEnumerable<string> AuraNonValidatingConfigs
Expand Down
19 changes: 11 additions & 8 deletions src/Nethermind/Nethermind.Runner.Test/ConfigFilesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ public void Network_diag_tracer_disabled_by_default(string configWildcard)
}

[TestCase("mainnet", 2048)]
[TestCase("holesky", 2048)]
[TestCase("gnosis", 2048)]
[TestCase("poacore", 2048)]
[TestCase("energy", 2048)]
[TestCase("chiado", 2048)]
[TestCase("^mainnet ^spaceneth ^volta ^energy ^poacore ^gnosis ^chiado", 1024)]
[TestCase("^mainnet ^holesky ^spaceneth ^volta ^energy ^poacore ^gnosis ^chiado", 1024)]
[TestCase("spaceneth", 128)]
public void Tx_pool_defaults_are_correct(string configWildcard, int poolSize)
{
Expand All @@ -205,8 +206,9 @@ public void Tx_pool_defaults_are_correct(string configWildcard, int poolSize)
[TestCase("gnosis", true)]
[TestCase("mainnet", true)]
[TestCase("sepolia", true)]
[TestCase("holesky", true)]
[TestCase("chiado", true)]
[TestCase("^spaceneth ^goerli ^mainnet ^gnosis ^sepolia ^chiado", false)]
[TestCase("^spaceneth ^goerli ^mainnet ^gnosis ^sepolia ^holesky ^chiado", false)]
public void Json_defaults_are_correct(string configWildcard, bool jsonEnabled)
{
Test<IJsonRpcConfig, bool>(configWildcard, c => c.Enabled, jsonEnabled);
Expand Down Expand Up @@ -241,10 +243,11 @@ public void Snap_sync_settings_as_expected(string configWildcard, bool enabled)
Test<ISyncConfig, bool>(configWildcard, c => c.SnapSync, enabled);
}

[TestCase("^aura ^sepolia ^goerli ^mainnet", false)]
[TestCase("^aura ^sepolia ^holesky ^goerli ^mainnet", false)]
[TestCase("aura ^archive", true)]
[TestCase("^archive ^spaceneth", true)]
[TestCase("sepolia ^archive", true)]
[TestCase("holesky ^archive", true)]
[TestCase("goerli ^archive", true)]
[TestCase("mainnet ^archive", true)]
public void Stays_on_full_sync(string configWildcard, bool stickToFullSyncAfterFastSync)
Expand Down Expand Up @@ -326,6 +329,7 @@ public void Basic_configs_are_as_expected(string configWildcard, bool isProducti
[TestCase("goerli", BlobsSupportMode.StorageWithReorgs)]
[TestCase("^goerli", BlobsSupportMode.Disabled)]
[TestCase("sepolia", BlobsSupportMode.Disabled)]
[TestCase("holesky", BlobsSupportMode.Disabled)]
[TestCase("mainnet", BlobsSupportMode.Disabled)]
[TestCase("chiado", BlobsSupportMode.Disabled)]
[TestCase("gnosis", BlobsSupportMode.Disabled)]
Expand Down Expand Up @@ -368,7 +372,8 @@ public void Arena_order_is_default(string configWildcard)
[TestCase("goerli", 30_000_000L)]
[TestCase("mainnet", 30_000_000L)]
[TestCase("sepolia", 30_000_000L)]
[TestCase("^chiado ^gnosis ^goerli ^mainnet ^sepolia")]
[TestCase("holesky", 30_000_000L)]
[TestCase("^chiado ^gnosis ^goerli ^mainnet ^sepolia ^holesky")]
public void Blocks_defaults_are_correct(string configWildcard, long? targetBlockGasLimit = null, ulong secondsPerSlot = 12)
{
Test<IBlocksConfig, long?>(configWildcard, c => c.TargetBlockGasLimit, targetBlockGasLimit);
Expand Down Expand Up @@ -419,8 +424,8 @@ public void Memory_hint_is_enough(string configWildcard)
{
"goerli_archive.cfg",
"goerli.cfg",
"kovan.cfg",
"kovan_archive.cfg",
"holesky.cfg",
"holesky_archive.cfg",
"mainnet_archive.cfg",
"mainnet.cfg",
"poacore.cfg",
Expand All @@ -431,8 +436,6 @@ public void Memory_hint_is_enough(string configWildcard)
"spaceneth_persistent.cfg",
"volta.cfg",
"volta_archive.cfg",
"volta.cfg",
"volta_archive.cfg",
"energyweb.cfg",
"energyweb_archive.cfg",
"sepolia.cfg",
Expand Down
3 changes: 2 additions & 1 deletion src/Nethermind/Nethermind.Runner/configs/holesky.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"Sync": {
"FastSync": true,
"SnapSync": true,
"FastBlocks": true
"FastBlocks": true,
"FastSyncCatchUpHeightDelta": "10000000000"
},
"Metrics": {
"NodeName": "Holesky"
Expand Down

0 comments on commit dd613af

Please sign in to comment.