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

ValidateTxResult: accept single transaction blocks as currently produced by heimdall as valid #1030

Conversation

svenski123
Copy link
Contributor

Description

This is a minimal fix for issue #1026 affecting only heimdall and not the underlying tendermint/peppermint.

ValidateTxResult() is modified such that where the merkle proof fails verification, if the transaction is the only transaction block and the block header root hash matches the hash of the transaction, the transaction is considered valid.

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

Nodes audience

Any node running the heimdall rest server or the heimdall CLI tool.

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

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

Run heimdallcli query tx --chain-id=heimdall-137 [TXID] and similar queries - ensure transactions from single transaction blocks are reported as valid.

…, when the block contains a single transaction and the block header root hash matches the transaction hash itself, accept the transaction as valid.
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (e49b92f) 75.40% compared to head (56bb4eb) 75.40%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1030   +/-   ##
========================================
  Coverage    75.40%   75.40%           
========================================
  Files           49       49           
  Lines         5309     5309           
========================================
  Hits          4003     4003           
  Misses        1071     1071           
  Partials       235      235           

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

@github-actions
Copy link

github-actions bot commented Sep 1, 2023

This PR is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Sep 1, 2023
@svenski123 svenski123 marked this pull request as ready for review September 8, 2023 12:49
@VAIBHAVJINDAL3012 VAIBHAVJINDAL3012 requested a review from a team September 13, 2023 19:23
@VAIBHAVJINDAL3012
Copy link
Contributor

@svenski123 Thanks a lot for your active contribution to the codebase.

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

This PR is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 5, 2023
@anshalshukla anshalshukla merged commit 00712f8 into maticnetwork:develop Oct 5, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants