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

Handle unparsed blocks in Cardano transactions parser #1641

Merged
merged 9 commits into from
Apr 22, 2024

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented Apr 18, 2024

Content

This PR includes an update that adds a new configuration parameter to the Aggregator and Signer node. It allows to configure the behavior of the Cardano transactions parser with unparsed blocks (return or log the error).

The default value of the new parameter allow_unparsable_block is set to false, which returns an error when a block can't be parsed.
For mainnet and preprod networks, the value is forced to false, even if the parameter is set to true, to always return an error on stable networks.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is 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
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Issue(s)

Closes #1567

@dlachaume dlachaume changed the title Handle unparsed blocks in ctx parser Handle unparsed blocks in Cardano transactions parser Apr 18, 2024
@dlachaume dlachaume self-assigned this Apr 18, 2024
Copy link

github-actions bot commented Apr 18, 2024

Test Results

    3 files  ±0     43 suites  ±0   8m 19s ⏱️ -47s
  928 tests +4    928 ✅ +4  0 💤 ±0  0 ❌ ±0 
1 022 runs  +4  1 022 ✅ +4  0 💤 ±0  0 ❌ ±0 

Results for commit 25c8d02. ± Comparison against base commit 820d937.

♻️ This comment has been updated with latest results.

This function evaluate the possibility of validating the request to allow unparsable block or not, depending on the target Cardano network.
Add 'allow_unparsable_block' clap argument and Configuration parameter.
Add 'allow_unparsable_block' clap argument and Configuration parameter.
@dlachaume dlachaume force-pushed the damien/1567/handle-unparsed-blocks-in-ctx-parser branch from 7df3a7d to f5a3fd1 Compare April 19, 2024 09:28
@dlachaume dlachaume force-pushed the damien/1567/handle-unparsed-blocks-in-ctx-parser branch from f5a3fd1 to 452058a Compare April 19, 2024 09:36
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

Overall looks good 👍

@dlachaume dlachaume force-pushed the damien/1567/handle-unparsed-blocks-in-ctx-parser branch from 452058a to 5d06859 Compare April 19, 2024 10:07
@dlachaume dlachaume marked this pull request as ready for review April 19, 2024 10:08
@dlachaume dlachaume force-pushed the damien/1567/handle-unparsed-blocks-in-ctx-parser branch from 3f5c96c to 5b6cbcd Compare April 19, 2024 12:22
- Rename function 'allow_unparsable_block' to 'compute_allow_unparsable_block' and clarify its comment
- Add reference to pre-production network in 'allow_unparsable_block' comments
@dlachaume dlachaume force-pushed the damien/1567/handle-unparsed-blocks-in-ctx-parser branch from 5b6cbcd to 25c8d02 Compare April 19, 2024 12:24
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@dlachaume dlachaume merged commit d415b23 into main Apr 22, 2024
41 of 42 checks passed
@dlachaume dlachaume deleted the damien/1567/handle-unparsed-blocks-in-ctx-parser branch April 22, 2024 07:59
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.

Handle unparsed blocks in Cardano transactions parser
3 participants