Skip to content
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

Fix: ChainReaderBlockStreamer skips RollForward blocks at the tip #1877

Merged

Conversation

jpraynaud
Copy link
Member

@jpraynaud jpraynaud commented Aug 1, 2024

Content

This PR includes a fix to the ChainReaderBlockStreamer which skips RollForward blocks at the tip of the chain.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

Issue(s)

Closes #1875

@jpraynaud jpraynaud self-assigned this Aug 1, 2024
@jpraynaud jpraynaud requested review from sfauvel and dlachaume August 1, 2024 09:15
Copy link

github-actions bot commented Aug 1, 2024

Test Results

    4 files  ±0     52 suites  ±0   9m 4s ⏱️ ±0s
1 192 tests +1  1 192 ✅ +1  0 💤 ±0  0 ❌ ±0 
1 358 runs  +1  1 358 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit 9ce7ab3. ± Comparison against base commit 693ea4c.

This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.
mithril-common ‑ cardano_block_scanner::chain_reader_block_streamer::tests::test_parse_expected_multiple_rollforwards_below_block_number_threshold
mithril-common ‑ cardano_block_scanner::chain_reader_block_streamer::tests::test_parse_expected_all_rollforwards_below_threshold_when_above_highest_block_number
mithril-common ‑ cardano_block_scanner::chain_reader_block_streamer::tests::test_parse_expected_multiple_rollforwards_up_to_block_number_threshold

♻️ This comment has been updated with latest results.

@jpraynaud jpraynaud temporarily deployed to testing-preview August 1, 2024 09:23 — with GitHub Actions Inactive
@jpraynaud jpraynaud temporarily deployed to testing-sanchonet August 1, 2024 09:23 — with GitHub Actions Inactive
Copy link
Collaborator

@sfauvel sfauvel left a comment

Choose a reason for hiding this comment

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

LGTM

…ove the limit

In the Chain Reader Block Streamer, the Chain Reader reads the block strictly
above the threshold instead of stopping as soon as the threshold is reached.
When the Chain Reader is at the tip of the chain, the underlying chain sync client
switches agency and it can not find a new intersection then.
The result is that the block which was read too early was never recorded in the store,
which caused a wrong computation of some of the block range roots and thus of the protocol message.
- 'mithril-common' from '0.4.41' to '0.4.42'.
@jpraynaud jpraynaud force-pushed the ensemble/1875-fix-edge-case-chain-reader-block-streamer branch from c2dceb5 to 9ce7ab3 Compare August 1, 2024 14:20
@jpraynaud jpraynaud temporarily deployed to testing-preview August 1, 2024 14:30 — with GitHub Actions Inactive
@jpraynaud jpraynaud temporarily deployed to testing-sanchonet August 1, 2024 14:30 — with GitHub Actions Inactive
@jpraynaud jpraynaud merged commit a2faf35 into main Aug 1, 2024
40 of 42 checks passed
@jpraynaud jpraynaud deleted the ensemble/1875-fix-edge-case-chain-reader-block-streamer branch August 1, 2024 14:44
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.

dev-mainnet not signing Cardano transaction after full import
3 participants