-
Notifications
You must be signed in to change notification settings - Fork 159
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
feat(tool): forest-tool api generate-test-snapshot #5074
base: main
Are you sure you want to change the base?
Conversation
7696c1a
to
f496aed
Compare
f496aed
to
91e4716
Compare
…m/forest-tool-api-generate-test-snapshot
} | ||
|
||
fn setting_keys(&self) -> anyhow::Result<Vec<String>> { | ||
// HACKHACK: may need some care |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could deal with these HACKHACK
later when they are used by some RPC methods and the snap generation flow fails since everything here is offline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format of the memory-db is not stable. If someone changes the memory-db internals, this code will fail. We'll either have to deal with it right now or in the future. I vote to deal with it right now.
Deploying forest-docs with Cloudflare Pages
|
@lemmih Switched to Forest CAR DB as discussed. |
827e63a
to
18089eb
Compare
Summary of changes
This PR includes changes in #5034
Changes introduced in this pull request:
forest-tool api generate-test-snapshot
forest-tool api test
(Will use a separate PR to add below steps to dev docs)
Step 1: generating RPC test dumps
forest-tool api compare --dump-dir /var/tmp/rpc-dumps ...
Step 2: generate RPC test snapshots
forest-tool api generate-test-snapshot --db ~/.local/share/forest/calibnet/0.23.0 --chain calibnet --out-dir /var/tmp/rpc-snapshots /var/tmp/test-dumps/filecoin_stategetallallocations*.json
Step 2(b): zstd compress test snapshots
Step 3: verify test snapshots
forest-tool api test /var/tmp/rpc-snapshots/*.json
orforest-tool api test /var/tmp/rpc-snapshots/*.zst
Step 3(b): update unit test
test_snapshots.txt
cargo test --lib -- --test rpc_regression_tests --nocapture
Reference issue to close (if applicable)
Closes #5034
Other information and links
Change checklist