Skip to content

Commit

Permalink
Rename xdai chainspec and add gnosis config
Browse files Browse the repository at this point in the history
  • Loading branch information
jmederosalvarado committed Dec 26, 2022
1 parent bb2b5a8 commit 5db96cf
Show file tree
Hide file tree
Showing 18 changed files with 58 additions and 1,068 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "DaiChain",
"name": "GnosisChain",
"engine": {
"authorityRound": {
"params": {
Expand Down
281 changes: 0 additions & 281 deletions src/Nethermind/Chains/xdai_nethermind_testnet.json

This file was deleted.

284 changes: 0 additions & 284 deletions src/Nethermind/Chains/xdai_testnet.json

This file was deleted.

273 changes: 0 additions & 273 deletions src/Nethermind/Chains/xdai_themerge.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Network.Test/ForkInfoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void Fork_id_and_hash_as_expected_on_sepolia(long head, string forkHashHe
public void Fork_id_and_hash_as_expected_on_gnosis(long head, string forkHashHex, long next, string description)
{
ChainSpecLoader loader = new ChainSpecLoader(new EthereumJsonSerializer());
ChainSpec spec = loader.Load(File.ReadAllText(Path.Combine("../../../../Chains", "xdai.json")));
ChainSpec spec = loader.Load(File.ReadAllText(Path.Combine("../../../../Chains", "gnosis.json")));
ChainSpecBasedSpecProvider provider = new ChainSpecBasedSpecProvider(spec);
Test(head, KnownHashes.GnosisGenesis, forkHashHex, next, description, provider);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
<Content Include="..\Chains\volta.json" CopyToOutputDirectory="PreserveNewest">
<Link>Chains\volta.json</Link>
</Content>
<Content Include="..\Chains\xdai.json" CopyToOutputDirectory="PreserveNewest">
<Link>Chains\xdai.json</Link>
<Content Include="..\Chains\gnosis.json" CopyToOutputDirectory="PreserveNewest">
<Link>Chains\gnosis.json</Link>
</Content>

<Content Include="..\Nethermind.Runner\configs\*.cfg" Link="configs\%(RecursiveDir)%(Filename)%(Extension)">
Expand Down
41 changes: 41 additions & 0 deletions src/Nethermind/Nethermind.Runner/configs/gnosis.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"Init": {
"ChainSpecPath": "chainspec/gnosis.json",
"GenesisHash": "0x4f1dd23188aab3a76b463e4af801b52b1248ef073c648cbdc4c9333d3da79756",
"BaseDbPath": "nethermind_db/gnosis",
"LogFileName": "gnosis.logs.txt",
"MemoryHint": 768000000
},
"JsonRpc": {
"Enabled": true,
"EnginePort": 8551
},
"Sync": {
"FastSync": true,
"PivotNumber": 25550000,
"PivotHash": "0xeeef2af89d638f41a36cd47e256d63fa1e70783cef0ea1478fc5ef11cd95aee9",
"PivotTotalDifficulty": "8626000110427538733349499292577475819600160930",
"FastBlocks": true,
"UseGethLimitsInFastBlocks": false,
"FastSyncCatchUpHeightDelta": 10000000000
},
"Merge": {
"SecondsPerSlot": 5
},
"Mining": {
"MinGasPrice": "1000000000"
},
"EthStats": {
"Name": "Nethermind Gnosis"
},
"Metrics": {
"NodeName": "Gnosis"
},
"Bloom": {
"IndexLevelBucketSizes": [
16,
16,
16
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"StoreReceipts": true,
"ProcessingEnabled": true,
"IsMining": false,
"ChainSpecPath": "chainspec/xdai.json",
"ChainSpecPath": "chainspec/gnosis.json",
"BaseDbPath": "nethermind_db/ndm_consumer/xdai",
"StaticNodesPath": "Data/static-nodes.json",
"LogFileName": "ndm_consumer_xdai.logs.txt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"StoreReceipts": false,
"ProcessingEnabled": false,
"IsMining": false,
"ChainSpecPath": "chainspec/xdai.json",
"ChainSpecPath": "chainspec/gnosis.json",
"BaseDbPath": "nethermind_db/ndm_consumer/xdai",
"StaticNodesPath": "Data/static-nodes.json",
"LogFileName": "ndm_consumer_xdai_proxy.logs.txt",
Expand Down
4 changes: 2 additions & 2 deletions src/Nethermind/Nethermind.Runner/configs/xdai.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Init": {
"ChainSpecPath": "chainspec/xdai.json",
"ChainSpecPath": "chainspec/gnosis.json",
"GenesisHash": "0x4f1dd23188aab3a76b463e4af801b52b1248ef073c648cbdc4c9333d3da79756",
"BaseDbPath": "nethermind_db/xdai",
"LogFileName": "xdai.logs.txt",
Expand Down Expand Up @@ -38,4 +38,4 @@
16
]
}
}
}
4 changes: 2 additions & 2 deletions src/Nethermind/Nethermind.Runner/configs/xdai_aa.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Init": {
"ChainSpecPath": "chainspec/xdai.json",
"ChainSpecPath": "chainspec/gnosis.json",
"GenesisHash": "0x4f1dd23188aab3a76b463e4af801b52b1248ef073c648cbdc4c9333d3da79756",
"BaseDbPath": "nethermind_db/xdai",
"LogFileName": "xdai.logs.txt",
Expand Down Expand Up @@ -49,4 +49,4 @@
16
]
}
}
}
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Runner/configs/xdai_archive.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Init": {
"ChainSpecPath": "chainspec/xdai.json",
"ChainSpecPath": "chainspec/gnosis.json",
"GenesisHash": "0x4f1dd23188aab3a76b463e4af801b52b1248ef073c648cbdc4c9333d3da79756",
"BaseDbPath": "nethermind_db/xdai_archive",
"LogFileName": "xdai_archive.logs.txt",
Expand Down
4 changes: 2 additions & 2 deletions src/Nethermind/Nethermind.Runner/configs/xdai_mev.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Init": {
"ChainSpecPath": "chainspec/xdai.json",
"ChainSpecPath": "chainspec/gnosis.json",
"GenesisHash": "0x4f1dd23188aab3a76b463e4af801b52b1248ef073c648cbdc4c9333d3da79756",
"BaseDbPath": "nethermind_db/xdai",
"LogFileName": "xdai.logs.txt",
Expand Down Expand Up @@ -42,4 +42,4 @@
"Enabled": true,
"MaxMergedBundles": 3
}
}
}

This file was deleted.

72 changes: 0 additions & 72 deletions src/Nethermind/Nethermind.Runner/configs/xdai_testnet.cfg

This file was deleted.

74 changes: 0 additions & 74 deletions src/Nethermind/Nethermind.Runner/configs/xdai_themerge.cfg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Init": {
"StoreReceipts" : false,
"IsMining": true,
"ChainSpecPath": "chainspec/xdai.json",
"ChainSpecPath": "chainspec/gnosis.json",
"GenesisHash": "0x4f1dd23188aab3a76b463e4af801b52b1248ef073c648cbdc4c9333d3da79756",
"BaseDbPath": "nethermind_db/xdai",
"LogFileName": "xdai_validator.logs.txt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ public void Can_load_goerli()
}

[Test]
public void Can_load_xdai()
public void Can_load_gnosis()
{
string path = Path.Combine(TestContext.CurrentContext.WorkDirectory, "../../../../", "Chains/xdai.json");
string path = Path.Combine(TestContext.CurrentContext.WorkDirectory, "../../../../", "Chains/gnosis.json");
ChainSpec chainSpec = LoadChainSpec(path);

Assert.AreEqual(1.GWei(), chainSpec.Parameters.Eip1559BaseFeeInitialValue, $"fork base fee");
Assert.AreEqual(100, chainSpec.ChainId, $"{nameof(chainSpec.ChainId)}");
Assert.AreEqual("DaiChain", chainSpec.Name, $"{nameof(chainSpec.Name)}");
Assert.AreEqual("GnosisChain", chainSpec.Name, $"{nameof(chainSpec.Name)}");
Assert.AreEqual(SealEngineType.AuRa, chainSpec.SealEngineType, "engine");

int berlinXdaiBlockNumber = 16101500;
Expand Down

0 comments on commit 5db96cf

Please sign in to comment.