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

feat: implement eip4788 #12570

Merged
merged 10 commits into from
Aug 8, 2023
Merged

feat: implement eip4788 #12570

merged 10 commits into from
Aug 8, 2023

Conversation

terencechain
Copy link
Member

This PR implements EIP4788 on Prysm. Majority of the changes are on the execution API

@terencechain terencechain added Blocked Blocked by research or external factors Deneb PRs or issues for the Deneb upgrade labels Jun 27, 2023
@terencechain terencechain self-assigned this Jun 27, 2023
@terencechain terencechain force-pushed the eip4788 branch 3 times, most recently from 4275a62 to 6bcb81f Compare June 28, 2023 16:42
@terencechain terencechain marked this pull request as ready for review June 28, 2023 16:42
@terencechain terencechain requested a review from a team as a code owner June 28, 2023 16:42
@terencechain terencechain requested review from kasey, rauljordan and potuz and removed request for a team June 28, 2023 16:42
return nil, consensus_types.ErrNotSupported("PayloadAttributePbV3", a.version)
}
if a.timeStamp == 0 && len(a.prevRandao) == 0 {
return nil, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Given we are validating fields here, should we check that parent beacon block root and other fields are non-nil here?

Copy link
Contributor

Choose a reason for hiding this comment

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

and non-empty

Copy link
Member Author

Choose a reason for hiding this comment

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

I dont think this check is necessary so ill remove it

Copy link
Contributor

@saolyn saolyn left a comment

Choose a reason for hiding this comment

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

You seem to have a couple messed up imports, probably from another branch that was merged in

return nil, errNilPayloadAttribute
}
if a.version != version.Deneb {
return nil, consensus_types.ErrNotSupported("PayloadAttributePbV3", a.version)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return nil, consensus_types.ErrNotSupported("PayloadAttributePbV3", a.version)
return nil, consensus_types.ErrNotSupported("PbV3", a.version)

Previous versions are also mismatched.

a, err := New(&enginev1.PayloadAttributesV2{})
require.NoError(t, err)
_, err = a.PbV3()
require.ErrorContains(t, "PayloadAttributePbV3 is not supported for capella: unsupported getter", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not a suggestion to change the code, but my personal opinion is that tests are less fragile when we check for a small meaningful part of the error message that is unlikely to change. In this example I would only check for not supported. Having the whole error message in the assertion means that you will need to update the test if the name of the function changes, or the unsupported getter part.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, but it's also good to check against PbV3 vs V2 or V1. In this case, I am inclined to leave it as it is

@terencechain terencechain force-pushed the eip4788 branch 4 times, most recently from 739ca9e to 245b2dc Compare July 22, 2023 13:43
@terencechain
Copy link
Member Author

ready for another look @rkapka @rauljordan !

@terencechain
Copy link
Member Author

e2e failed, we'll need ethereum/go-ethereum#27289 to merge

@terencechain terencechain force-pushed the eip4788 branch 2 times, most recently from 102ff8f to f8bc11f Compare July 28, 2023 20:47
Comment on lines -1103 to +1110
vh0 := [32]byte{1, 207, 35, 21, 201, 118, 88, 167, 237, 84, 173, 161, 129, 118, 94, 35, 179, 250, 219, 81, 80, 250, 179, 149, 9, 246, 49, 192, 185, 175, 69, 102}
vh1 := [32]byte{1, 226, 124, 226, 142, 82, 126, 176, 113, 150, 179, 26, 240, 245, 250, 24, 130, 172, 231, 1, 166, 130, 2, 42, 183, 121, 248, 22, 172, 57, 212, 126}
vh0 := "0x01cf2315c97658a7ed54ada181765e23b3fadb5150fab39509f631c0b9af4566"
vh1 := "0x01e27ce28e527eb07196b31af0f5fa1882ace701a682022ab779f816ac39d47e"
Copy link
Member

Choose a reason for hiding this comment

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

yeah this is a nice improvement

@terencechain terencechain merged commit 64dd282 into deneb-integration Aug 8, 2023
@terencechain terencechain deleted the eip4788 branch August 8, 2023 22:49
terencechain added a commit that referenced this pull request Aug 16, 2023
james-prysm pushed a commit that referenced this pull request Aug 16, 2023
kasey pushed a commit that referenced this pull request Aug 21, 2023
kasey pushed a commit that referenced this pull request Aug 22, 2023
kasey pushed a commit that referenced this pull request Aug 22, 2023
kasey pushed a commit that referenced this pull request Aug 22, 2023
kasey pushed a commit that referenced this pull request Aug 23, 2023
kasey pushed a commit that referenced this pull request Aug 23, 2023
kasey pushed a commit that referenced this pull request Aug 23, 2023
kasey pushed a commit that referenced this pull request Aug 24, 2023
kasey pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 24, 2023
james-prysm pushed a commit that referenced this pull request Aug 25, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 30, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 30, 2023
prestonvanloon pushed a commit that referenced this pull request Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deneb PRs or issues for the Deneb upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants