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

Process blind withdrawals #11995

Merged
merged 15 commits into from
Feb 17, 2023
Merged

Process blind withdrawals #11995

merged 15 commits into from
Feb 17, 2023

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Feb 15, 2023

With a blind payload (i.e header), the withdrawal list is represented as a root. Given limited information, a node will not be able to process the state root using a withdrawal root. The node should use expected withdrawals in the state to process withdrawal when processing a blind payload.

for i, withdrawal := range withdrawals {
if withdrawal.Index != expected[i].Index {

for i, withdrawal := range expectedWithdrawals {
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't make any sense, you are comparing the same objects in each loop . Basically if a.Index != a.Index , which will never be triggered.

@rkapka
Copy link
Contributor

rkapka commented Feb 16, 2023

Can you add a unit test to blinded/non-blinded cases where the root doesn't match the expected root?

@terencechain terencechain self-assigned this Feb 16, 2023
@terencechain terencechain added Ready For Review A pull request ready for code review Priority: High High priority item labels Feb 16, 2023
@terencechain
Copy link
Member Author

Done

Copy link
Contributor

@rauljordan rauljordan left a comment

Choose a reason for hiding this comment

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

Hi @terencechain , @saolyn and I just went through this together and the main feedback we have is that this PR should have a clear description of the changes and also why we need them. Also, a comment on ProcessWithdrawals that mentions this will work with both blinded and full execution data would be ideal. We also wanted to double check that both branches of the conditional added are covered in tests

nisdas
nisdas previously approved these changes Feb 17, 2023
@terencechain terencechain added this pull request to the merge queue Feb 17, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 17, 2023
@terencechain terencechain added this pull request to the merge queue Feb 17, 2023
@terencechain terencechain removed this pull request from the merge queue due to a manual request Feb 17, 2023
@terencechain terencechain added this pull request to the merge queue Feb 17, 2023
@terencechain terencechain removed this pull request from the merge queue due to a manual request Feb 17, 2023
@terencechain terencechain added this pull request to the merge queue Feb 17, 2023
@terencechain terencechain removed this pull request from the merge queue due to a manual request Feb 17, 2023
@nisdas nisdas added this pull request to the merge queue Feb 17, 2023
@nisdas nisdas removed this pull request from the merge queue due to the queue being cleared Feb 17, 2023
@nisdas nisdas merged commit a6dd561 into develop Feb 17, 2023
@delete-merged-branch delete-merged-branch bot deleted the process-blind-withdrawals branch February 17, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High High priority item Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants