Skip to content

Add/era export import test#33

Open
brbrr wants to merge 26 commits intomainfrom
add/era-export-import-test
Open

Add/era export import test#33
brbrr wants to merge 26 commits intomainfrom
add/era-export-import-test

Conversation

@brbrr
Copy link
Copy Markdown
Contributor

@brbrr brbrr commented Apr 22, 2025

Adds an import/export era test.

The test expects a node with FastSync/SnapSync flags enabled and AncientBarriers set to 0 (mostly for sepolia usecase defaults are bumped to post-merge)

The flow is quite simple:

  • Check the node config is as expected
  • Wait for node to sync
  • Update config with Export flags and restart the node
  • Wait for node to finish export
  • Remove db and update config with Import flags and restart the node
  • Wait for node to finish import
  • Verify that eth_getBlockByNumber for mergeBlock / 2 is the same

@brbrr brbrr self-assigned this Apr 22, 2025
@brbrr brbrr requested review from Copilot and kamilchodola May 1, 2025 02:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces an end-to-end test for the era export/import functionality and updates the NodeInfo helper to accommodate a new network type as well as refine the conversion logic for merge block numbers.

  • Adds a comprehensive test (ExportImportTest) for era export and import, including log verifications and Docker container management.
  • Introduces a new network type "Hoodi" and updates the conversion method in GetNetworkType.

Reviewed Changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 3 comments.

File Description
NethermindNode.Tests/Tests/HistoryExpiry/EraTests.cs New integration test for era export/import functionality
NethermindNode.Core/Helpers/NodeInfo.cs Updates to network type conversion and inclusion of a new network type
Files not reviewed (2)
  • NethermindNode.Tests/NethermindNode.Tests.csproj: Language not supported
  • nethermind: Language not supported

Comment thread NethermindNode.Tests/Tests/HistoryExpiry/EraTests.cs Outdated
Comment thread NethermindNode.Tests/Tests/HistoryExpiry/EraTests.cs Outdated
Comment thread NethermindNode.Tests/Tests/HistoryExpiry/EraTests.cs Outdated
brbrr and others added 3 commits May 1, 2025 10:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment on lines +228 to +230
case NetworkType.Sepolia: return 1000000;
case NetworkType.Hoodi: return 100000;
case NetworkType.Holesky: return 100000;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of speed - I decided to use relatively small number. probably we could update it to be more realistic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants