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

Disable reverted tx optimization in block-stm validation #891

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

cffls
Copy link
Contributor

@cffls cffls commented Jun 6, 2023

A reverted transaction, X, can incorrectly write to a slot, which might be read by another transaction, Y. If we skip checking states written by X, then Y might end up with reading the wrong value and we won't be able to detect this error.

Description

Please provide a detailed description of what was done in this PR

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Nodes audience

In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply
  • Created a task in Jira and informed the team for implementation in Erigon client (if applicable)
  • Includes RPC methods changes, and the Notion documentation has been updated

Cross repository changes

  • This PR requires changes to heimdall
    • In case link the PR here:
  • This PR requires changes to matic-cli
    • In case link the PR here:

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on mumbai
  • I have created new e2e tests into express-cli

Manual tests

Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

A reverted transaction, X, can incorrectly write to a slot, which might be read by another transaction, Y. If we skip checking states written by X, then Y might end up with reading the wrong value and we won't be able to detect this error.
@cffls cffls marked this pull request as ready for review June 6, 2023 16:24
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Patch coverage: 2.56% and project coverage change: +0.03 🎉

Comparison is base (3d30c34) 56.82% compared to head (ac6e4f9) 56.85%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #891      +/-   ##
===========================================
+ Coverage    56.82%   56.85%   +0.03%     
===========================================
  Files          617      617              
  Lines        73599    73613      +14     
===========================================
+ Hits         41819    41856      +37     
+ Misses       28234    28219      -15     
+ Partials      3546     3538       -8     
Impacted Files Coverage Δ
consensus/bor/bor.go 7.16% <0.00%> (-0.18%) ⬇️
consensus/bor/genesis_contract_mock.go 0.00% <0.00%> (ø)
consensus/bor/span_mock.go 0.00% <0.00%> (ø)
core/blockstm/mvhashmap.go 77.11% <ø> (+1.28%) ⬆️
params/config.go 29.52% <0.00%> (-0.29%) ⬇️
graphql/graphql.go 15.52% <50.00%> (ø)

... and 26 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cffls cffls merged commit f96c668 into maticnetwork:develop Jun 7, 2023
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