test: update test data to new block and consolidate fixtures under test_data/#108
test: update test data to new block and consolidate fixtures under test_data/#108
Conversation
|
The PR currently has no labels applied. Based on the changes — updating test data fixtures (blocks 1139–1160 → 349–370), consolidating genesis config under There is no dedicated |
|
The code change (path update in
The README examples should be updated to either use |
|
The current label enhancement ("New feature or request") does not match the nature of this PR. This PR updates test data fixtures and consolidates them under None of the available labels are a perfect fit (the repo has no |
|
The consolidation looks good and the code change is correct. One minor issue: the README replaced two concrete paths ( |
|
The PR currently has no labels, but the |
3f52bb8 to
29d2e0e
Compare
|
LGTM. Test data updated cleanly, genesis config consolidated under |
|
The refactoring is clean — renaming One bug: the README examples were updated to |
2bf1d33 to
4bb25ce
Compare
|
The refactor is clean overall — TestData::load() is a clear improvement over the old create_rpc_module_context(), and the synthetic/mainnet split is a good structural change. Two existing inline threads are still unresolved and need addressing:
One new concern: the Foundry installation in |
| fn setup_test_db(data: &TestData) -> Result<Arc<ValidatorDB>> { | ||
| let temp_dir = tempfile::tempdir()?; | ||
| let validator_db = ValidatorDB::new(temp_dir.path().join(VALIDATOR_DB_FILENAME))?; | ||
| std::mem::forget(temp_dir); |
There was a problem hiding this comment.
The comment explaining this intentional leak was removed. Without it, std::mem::forget here looks like a bug. Please restore it:
| std::mem::forget(temp_dir); | |
| // Intentionally leak the temp dir — ValidatorDB holds a path into it. | |
| // The OS will clean it up when the test process exits. | |
| std::mem::forget(temp_dir); |
|
Overall this is a clean refactor. The test data restructuring into One issue to fix:
Previous threads resolved:
|
|
Good work overall. A few things to address: PR description is incomplete. The summary only describes test data replacement and genesis relocation, but the PR also includes a substantial code refactoring (
Foundry action version not pinned. See inline comment. The |
|
|
||
| # mega-evm coverage tests require Foundry (solc/forge) for compilation. | ||
| - name: Install Foundry | ||
| uses: foundry-rs/foundry-toolchain@v1 |
There was a problem hiding this comment.
Pin this to a commit SHA for reproducibility and supply-chain safety. @v1 is a mutable tag that can be updated by the action's author at any time.
| uses: foundry-rs/foundry-toolchain@v1 | |
| uses: foundry-rs/foundry-toolchain@82251fa6f7eb7e9e5a29c9d3e2b7b72e44f1dee0 # v1 |
(Use the current SHA for v1; verify via git ls-remote https://github.com/foundry-rs/foundry-toolchain refs/tags/v1.)
Summary
Replace test data fixtures with a new block range (349–370) and consolidate all test assets under
test_data/.genesis/genesis.jsonintotest_data/genesis.jsonso all test fixtures live under a single directory, and update theTEST_GENESIS_FILEpath inmain.rsaccordingly.test_data/contracts.txtto match the new block range's contract set.Details
Test data replacement (blocks 1139–1160 → 349–370)
test_data/blocks/for the old range (1139–1160)..saltand.mptwitness files undertest_data/stateless/witness/for the old range..saltand.mptwitness files for the new range.Genesis config relocation
genesis/genesis.json→test_data/genesis.json(with minor content updates to match the new chain state).TEST_GENESIS_FILEconstant inbin/stateless-validator/src/main.rsfrom../../genesis/genesis.jsonto../../test_data/genesis.json.Contracts list update
test_data/contracts.txtto the reduced set of contracts relevant to the new block range.Test plan
cargo test -p stateless-validatorto verify integration tests pass with the new test data.cargo testto confirm no other tests are broken by the genesis file relocation.genesis/directory is no longer referenced anywhere in the codebase.