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

Make upper bound of ChainReaderBlockStreamer inclusive #1835

Merged
merged 3 commits into from
Jul 16, 2024

Conversation

Alenar
Copy link
Collaborator

@Alenar Alenar commented Jul 16, 2024

Content

This PR changes how the ChainReaderBlockStreamer handle it's upper bound (its until parameter):
Before its upper bound was exclusive, this was fine when others subsystems were also exclusive but this changed with the fixes for #1785: now the until parameter is the last block to include in the signature instead of being the block where to stop polling.

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

Comments

Should this parameter be still named until ?

Issue(s)

Relates to #1785

Copy link

github-actions bot commented Jul 16, 2024

Test Results

    4 files  ±0     52 suites  ±0   9m 11s ⏱️ -1s
1 153 tests ±0  1 153 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 319 runs  ±0  1 319 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 2380c63. ± Comparison against base commit 4bc87f0.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
mithril-common ‑ cardano_block_scanner::chain_reader_block_streamer::tests::test_parse_expected_nothing_above_block_number_threshold
mithril-common ‑ cardano_block_scanner::chain_reader_block_streamer::tests::test_parse_expected_nothing_strictly_above_block_number_threshold

♻️ This comment has been updated with latest results.

Before its upper bound was exclusive this was fine when others
subsystems were also exclusive but this changed with the fixes
for #1785: now the `until` parameter the last block to include in the
signature instead of being the block were we should stop polling.
From `1` to `15`.

With only `1` the chain reader used to parse transactions from the chain
would switch to 'agency' mode since we are really close to the tip of
the chain.
In this mode the client/server relationship is reversed and our code
must wait a message from the cardano node in order to continue polling
blocks.
But the chain reader don't handle that case when we are setting the
starting chain point, leading to a recuring error that would block all
subsenquent calls.

So increasing the security parameter allow us to avoid this problem by
never be so close to the tip than we switch mode.
* Mithril-aggregator from `0.5.43` to `0.5.44`
* Mithril-signer from `0.2.165` to `0.2.166`
* Mithril-common from `0.4.30` to `0.4.31`
* Mithril-end-to-end from `0.4.21` to `0.4.22`
@Alenar Alenar force-pushed the djo/1785/chain_block_streamer_inclusive_upper_bound branch from 82d00d4 to 2380c63 Compare July 16, 2024 14:51
@Alenar Alenar temporarily deployed to testing-sanchonet July 16, 2024 14:59 — with GitHub Actions Inactive
@Alenar Alenar merged commit ba32347 into main Jul 16, 2024
40 checks passed
@Alenar Alenar deleted the djo/1785/chain_block_streamer_inclusive_upper_bound branch July 16, 2024 15:00
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.

3 participants