Skip to content

Conversation

@serejkaaa512
Copy link
Contributor

@serejkaaa512 serejkaaa512 commented Sep 4, 2025

Pull Request Checklist

NODE CONFIGURATION MODEL CHANGES

[None]

BLOCKCHAIN CONFIGURATION MODEL CHANGES

[None]

COMPATIBILITY

[fully compatible]

SPECIAL DEPLOYMENT ACTIONS

[Not Required]

PERFORMANCE IMPACT

[No impact expected]

TESTS

Unit Tests

[No coverage]

Network Tests

[No coverage]

Manual Tests

Run local nodes, run the one to many script, that generate shard blocks with many internals, stop nodes. Run dump state tool with master block id. Script dumps master and referred shards. Runtest_collation_from_dump, that produces new shard blocks and master block.

@serejkaaa512 serejkaaa512 requested a review from SmaGMan September 4, 2025 09:56
@github-actions
Copy link

github-actions bot commented Sep 4, 2025

🧪 Network Tests

To run network tests for this PR, use:

gh workflow run network-tests.yml -f pr_number=891

Available test options:

  • Run all tests: gh workflow run network-tests.yml -f pr_number=891
  • Run specific test: gh workflow run network-tests.yml -f pr_number=891 -f test_selection=ping-pong

Test types: destroyable, ping-pong, one-to-many-internal-messages, fq-deploy, nft-index, persistent-sync

Results will be posted as workflow runs in the Actions tab.

@serejkaaa512 serejkaaa512 linked an issue Sep 4, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

❌ Patch coverage is 32.33533% with 339 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.30%. Comparing base (bb2d3cc) to head (0cb6ccd).

Files with missing lines Patch % Lines
cli/src/cmd/tools/dump_state.rs 0.00% 275 Missing ⚠️
collator/src/test_utils.rs 67.50% 7 Missing and 45 partials ⚠️
collator/src/mempool/impls/dump_anchors.rs 58.82% 6 Missing and 1 partial ⚠️
collator/src/mempool/impls/stub_impl.rs 94.87% 2 Missing ⚠️
collator/src/mempool/mod.rs 33.33% 2 Missing ⚠️
cli/src/cmd/tools/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #891      +/-   ##
==========================================
+ Coverage   46.27%   54.30%   +8.02%     
==========================================
  Files         360      361       +1     
  Lines       62584    63056     +472     
  Branches    62584    63056     +472     
==========================================
+ Hits        28961    34240    +5279     
+ Misses      32108    26905    -5203     
- Partials     1515     1911     +396     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@serejkaaa512 serejkaaa512 force-pushed the feature/restore branch 2 times, most recently from f4483b9 to 11657bc Compare September 4, 2025 10:03
@serejkaaa512 serejkaaa512 force-pushed the feature/restore branch 11 times, most recently from 1f39588 to a92e67c Compare September 24, 2025 15:57
@serejkaaa512 serejkaaa512 force-pushed the feature/restore branch 4 times, most recently from f7cd958 to d985030 Compare September 25, 2025 14:35
@serejkaaa512
Copy link
Contributor Author

Example, how to use:

  1. ./tycho tool dump-state --config /var/node/data/config.json --output dump2 --block-id "0:8000000000000000:339:c184d561b5ca4178b6c433a2fa73a7a962533f67926cbdced8241b5e38e958a4:0ea492bc85c701f6ef03cb8a35995eab7a3eaf0545b59d3b27f51b5fcea89016"
  2. set dump_path in test dump2 folder
  3. set block_id_to_handle to the block, that is needed to be collated. For example, 0:8000000000000000:400 or -1:8000000000000000:250
  4. start test: RUST_BACKTRACE=1 cargo test -p tycho-collator --features test --test collation_tests -- --nocapture
  5. wait for all states and blocks to load and collation of blocks to start.

@serejkaaa512 serejkaaa512 force-pushed the feature/restore branch 2 times, most recently from dd10fe7 to b417d31 Compare December 17, 2025 08:19
Copy link
Contributor

@SmaGMan SmaGMan left a comment

Choose a reason for hiding this comment

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

We should dump only required anchors into files and use them during the test. Not full mempool database. In the commit 1e4355f there is an example how to dump the anchor.

@github-actions
Copy link

❌ CLI reference check failed in CI.

Please run just update_cli_reference, add the updated docs/cli-reference.md, and push the changes.

@serejkaaa512 serejkaaa512 force-pushed the feature/restore branch 3 times, most recently from 26d1ac3 to ad21336 Compare December 29, 2025 11:29
@serejkaaa512 serejkaaa512 force-pushed the feature/restore branch 2 times, most recently from 950626e to 3408490 Compare December 30, 2025 08:15
Copy link
Member

@Mododo Mododo left a comment

Choose a reason for hiding this comment

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

lgtm!

feat(collator): remove test collator manager

feat(collator): fix dump path

feat(collator): rename dump test, fix test stop on received block

feat(collator): improve collation_tests
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.

Create toolset to dump node state from db

6 participants