-
Notifications
You must be signed in to change notification settings - Fork 783
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
Client/Blockchain: receipt reorg logic #3146
Conversation
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
… payload < skeleton height
this._heads[name] = headHash | ||
if (this.events.listenerCount('deletedCanonicalBlocks') > 0) { | ||
const block = await this.getBlock(blockNumber) | ||
this._deletedBlocks.push(block) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is only real change, rest is just formatting change because of try catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm,
This PR attempts to resolve hive failures in:
./hive --client ethereumjs --sim ethereum/engine --sim.limit="engine-cancun/Transaction Re-Org"
and./hive --client ethereumjs --sim ethereum/engine --sim.limit="engine-cancun/Invalid Missing Ancestor Syncing ReOrg"
This PR:
blockchain
: once blocks get reorged and deleted,deletedCanonicalBlocks
event is emittedeth_getTransactionReceipt
: this verifies that the receipt is in the canonical chainnewPayload
/forkchoiceUpdated
in case the block is lower than the currently known invalid blocks.To test this, an extra diff has to be added. This hacks in a way that a peer is always returned, to ensure that the syncing process is completed. Diff for
./packages/client/src/sync/beaconsync.ts
:When running all tests, this brings the failing tests down to just 3 (note, if more fail, re-run these individual tests, they might be flakey which sometimes happens)