Skip to content

test: update test data to new block and consolidate fixtures under test_data/#108

Open
flyq wants to merge 2 commits intomainfrom
liquan/update_test_data
Open

test: update test data to new block and consolidate fixtures under test_data/#108
flyq wants to merge 2 commits intomainfrom
liquan/update_test_data

Conversation

@flyq
Copy link
Member

@flyq flyq commented Mar 25, 2026

Summary

Replace test data fixtures with a new block range (349–370) and consolidate all test assets under test_data/.

  • Remove old test block JSON files (blocks 1139–1160) and their corresponding SALT/MPT witness files, and add new ones for blocks 349–370.
  • Move genesis/genesis.json into test_data/genesis.json so all test fixtures live under a single directory, and update the TEST_GENESIS_FILE path in main.rs accordingly.
  • Update test_data/contracts.txt to match the new block range's contract set.

Details

Test data replacement (blocks 1139–1160 → 349–370)

  • Deleted 22 block JSON files under test_data/blocks/ for the old range (1139–1160).
  • Added 22 new block JSON files for the new range (349–370).
  • Deleted 21 pairs of .salt and .mpt witness files under test_data/stateless/witness/ for the old range.
  • Added 21 pairs of .salt and .mpt witness files for the new range.

Genesis config relocation

  • Moved genesis/genesis.jsontest_data/genesis.json (with minor content updates to match the new chain state).
  • Updated TEST_GENESIS_FILE constant in bin/stateless-validator/src/main.rs from ../../genesis/genesis.json to ../../test_data/genesis.json.

Contracts list update

  • Trimmed test_data/contracts.txt to the reduced set of contracts relevant to the new block range.

Test plan

  • Run cargo test -p stateless-validator to verify integration tests pass with the new test data.
  • Run cargo test to confirm no other tests are broken by the genesis file relocation.
  • Verify that the genesis/ directory is no longer referenced anywhere in the codebase.

@flyq flyq requested a review from Troublor as a code owner March 25, 2026 12:10
@claude
Copy link

claude bot commented Mar 25, 2026

The PR currently has no labels applied. Based on the changes — updating test data fixtures (blocks 1139–1160 → 349–370), consolidating genesis config under test_data/, and updating contracts.txt — the enhancement label seems most appropriate, as this improves the test infrastructure by consolidating fixtures under a single directory.

There is no dedicated test label in the repo's label set, so enhancement is the closest match from the available labels.

@claude
Copy link

claude bot commented Mar 25, 2026

The code change (path update in main.rs) is correct. One issue: the PR description says to verify genesis/ is no longer referenced anywhere in the codebase, but two places remain:

  • README.md:159--genesis-file ./genesis/genesis.json (example command)
  • README.md:194--genesis-file ./genesis/updated-genesis.json (example command)
  • AGENTS.md:44 — lists genesis/ as an additional directory in the project structure

The README examples should be updated to either use ./test_data/genesis.json or a generic placeholder path, and AGENTS.md should remove genesis/ from the directory list since it no longer exists.

@flyq flyq added the enhancement New feature or request label Mar 25, 2026
@claude
Copy link

claude bot commented Mar 25, 2026

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 test_data/ — there is no new feature or user-facing change. The PR title itself uses the test: conventional-commit prefix, which confirms it is a test/maintenance change.

None of the available labels are a perfect fit (the repo has no test or maintenance label), but enhancement should be removed as it is misleading. Consider adding a test label to the repository for this class of change, or simply leaving the PR unlabeled.

@claude
Copy link

claude bot commented Mar 25, 2026

The consolidation looks good and the code change is correct. One minor issue: the README replaced two concrete paths (./genesis/genesis.json, ./genesis/updated-genesis.json) with generic /path/to/... placeholders. Since the genesis file is still distributed in the repo (now at test_data/genesis.json), the example should point there — see inline comment.

@flyq flyq removed the enhancement New feature or request label Mar 25, 2026
@claude
Copy link

claude bot commented Mar 25, 2026

The PR currently has no labels, but the documentation label appears applicable: AGENTS.md is updated to reflect the new test fixture paths (e.g., the genesis file relocation). The primary changes are test data updates, but there is no test label available in the repo. Given what's available, documentation should be added to reflect the AGENTS.md changes.

@flyq flyq force-pushed the liquan/update_test_data branch from 3f52bb8 to 29d2e0e Compare March 25, 2026 13:41
@claude
Copy link

claude bot commented Mar 25, 2026

LGTM. Test data updated cleanly, genesis config consolidated under test_data/, all references updated consistently across AGENTS.md, README.md, and main.rs. Resolved the prior thread — it was already addressed by this PR.

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.

1 participant