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

Fix node restart on gnosis-cancun #6423

Merged
merged 37 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9204fa5
first draft
marcindsobczak Jan 19, 2023
181d6c1
add more things
marcindsobczak Jan 20, 2023
86a4411
fix metric
marcindsobczak Jan 20, 2023
45e935e
fix
marcindsobczak Jan 20, 2023
43ece72
add tests
marcindsobczak Jan 20, 2023
35798a0
add serializers and tests
marcindsobczak Jan 20, 2023
6e4d39a
simplification
marcindsobczak Jan 20, 2023
839f4a0
adjust network and rpc tests
marcindsobczak Jan 20, 2023
3f7a386
Merge remote-tracking branch 'origin/master' into feature/NodeDataPro…
marcindsobczak Jun 15, 2023
2a023ff
post-merge fixes
marcindsobczak Jun 15, 2023
cf8dc25
enable eth68
marcindsobczak Jun 15, 2023
798bb0b
adjust tests
marcindsobczak Jun 15, 2023
31964f6
fix
marcindsobczak Jun 15, 2023
cd42007
Merge branch 'master' into feature/NodeDataProtocol
rubo Sep 11, 2023
ef001c4
Merge branch 'master' into feature/NodeDataProtocol
rubo Sep 11, 2023
b63b42d
Merge branch 'master' into feature/NodeDataProtocol
rubo Sep 15, 2023
cdbc9db
Merge branch 'master' into feature/NodeDataProtocol
rubo Oct 6, 2023
ad70018
Merge branch 'master' into feature/NodeDataProtocol
rubo Oct 18, 2023
7d5b6f7
Merge branch 'master' into feature/NodeDataProtocol
rubo Oct 19, 2023
f757c3d
Merge branch 'master' into feature/NodeDataProtocol
rubo Oct 23, 2023
a96f931
Use blob gas instead of count
flcl42 Oct 27, 2023
5db3668
Shuffle 4844 constants, add GetMaxBlobsPerBlock
flcl42 Oct 30, 2023
c8e891a
Merge branch 'master' into feature/NodeDataProtocol
rubo Oct 30, 2023
8d7ca45
Merge remote-tracking branch 'origin/hotfix/use-gas-not-count-for-blo…
rubo Oct 30, 2023
0cb5853
Replace `Keccak` with `Hash256`
rubo Oct 30, 2023
520d3e6
Merge branch 'feature/NodeDataProtocol' into feature/gnosis-cancun
rubo Oct 30, 2023
06b9642
Merge branch 'master' into feature/NodeDataProtocol
rubo Nov 10, 2023
ac9d67f
Merge remote-tracking branch 'origin/master' into feature/NodeDataPro…
marcindsobczak Nov 28, 2023
c93c557
fix PeerInfoExtensions
marcindsobczak Nov 28, 2023
2dba88f
fix StateSyncDownloader
marcindsobczak Nov 28, 2023
e79fc37
fix GetNodeDataTrieNodeRecovery
marcindsobczak Nov 28, 2023
bb81f59
improve switching capabilities
marcindsobczak Nov 28, 2023
56a9c83
Merge branch 'feature/NodeDataProtocol' into feature/gnosis-cancun
rubo Nov 28, 2023
f2aa638
Merge branch 'master' into feature/gnosis-cancun
rubo Nov 28, 2023
04ae4a2
`WasProcessed = true` for Genesis `BlockInfo`
emlautarom1 Dec 19, 2023
eb64766
Merge branch 'master' into feature/gnosis-cancun-fix-restart
rubo Dec 22, 2023
806290d
Add tests
emlautarom1 Dec 28, 2023
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
7 changes: 4 additions & 3 deletions src/Nethermind/Nethermind.Blockchain.Test/BlockTreeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1827,8 +1827,9 @@ public void Find_handles_invalid_blocks(Func<BlockTree, Hash256?, BlockTreeLooku
findFunction(blockTree, invalidBlock.Hash, lookupOptions).Should().Be(foundInvalid ? invalidBlock.Header : null);
}

[Test]
public void On_restart_loads_already_processed_genesis_block()
[TestCase(true)]
[TestCase(false)]
public void On_restart_loads_already_processed_genesis_block(bool wereProcessed)
{
TestMemDb blocksDb = new();
TestMemDb headersDb = new();
Expand Down Expand Up @@ -1897,7 +1898,7 @@ public void On_restart_loads_already_processed_genesis_block()
tree.SuggestBlock(genesis);
tree.Genesis.Should().NotBeNull();

tree.UpdateMainChain(ImmutableList.Create(genesis), true);
tree.UpdateMainChain(ImmutableList.Create(genesis), wereProcessed);

tree.SuggestBlock(second);
tree.SuggestBlock(third);
Expand Down
1 change: 1 addition & 0 deletions src/Nethermind/Nethermind.Blockchain/BlockTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,7 @@ void SetTotalDifficultyDeep(BlockHeader current)
{
current.TotalDifficulty = current.Difficulty;
BlockInfo blockInfo = new(current.Hash, current.Difficulty);
blockInfo.WasProcessed = true;
UpdateOrCreateLevel(current.Number, current.Hash, blockInfo);
}

Expand Down