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

Return FullBlock from syncer #1110

Merged

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Jan 11, 2023

Description

This PR modifies the OnBlockInserted callback to consensus engine from syncer so that it returns a types.FullBlock (which contains transaction receipts as well, not just the block).

This is needed so that the consensus engine has all the necessary data for bridge to properly function, specifically exit workflow, since currently we are only extracting exit events when a block is inserted through consensus.

Changes include

  • 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)

Breaking changes

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

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@goran-ethernal goran-ethernal self-assigned this Jan 11, 2023
@goran-ethernal goran-ethernal added the bug fix Functionality that fixes a bug label Jan 11, 2023
@goran-ethernal goran-ethernal force-pushed the EVM-357-Syncer-should-return-a-full-block branch from 9569219 to c998e5f Compare January 11, 2023 10:34
@goran-ethernal goran-ethernal marked this pull request as ready for review January 11, 2023 10:54
consensus/polybft/fsm.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

❗ No coverage uploaded for pull request base (feature/v3-parity@9e9bd63). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 62166e6 differs from pull request most recent head c7d6bdb. Consider uploading reports for the commit c7d6bdb to get more accurate results

@@                 Coverage Diff                  @@
##             feature/v3-parity    #1110   +/-   ##
====================================================
  Coverage                     ?   54.57%           
====================================================
  Files                        ?      173           
  Lines                        ?    23007           
  Branches                     ?        0           
====================================================
  Hits                         ?    12557           
  Misses                       ?     9465           
  Partials                     ?      985           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

blockchain/blockchain.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ferranbt ferranbt 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, only major thing is to remove the functionality from WriteFullBlock of executing the Block itself and move that to a custom function (this is, split what WriteBlock does in two steps).

@goran-ethernal goran-ethernal force-pushed the EVM-357-Syncer-should-return-a-full-block branch from 7128dbb to 51ac590 Compare January 11, 2023 20:54
blockchain/blockchain.go Outdated Show resolved Hide resolved
@goran-ethernal goran-ethernal merged commit 217beb4 into feature/v3-parity Jan 12, 2023
@goran-ethernal goran-ethernal deleted the EVM-357-Syncer-should-return-a-full-block branch January 12, 2023 12:52
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2023
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

Late LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix Functionality that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants