Skip to content

WIP: Deneb integration no spectest or proto#12773

Closed
kasey wants to merge 58 commits intodeneb-integration-spectestfrom
deneb-integration-no-spectest-or-proto
Closed

WIP: Deneb integration no spectest or proto#12773
kasey wants to merge 58 commits intodeneb-integration-spectestfrom
deneb-integration-no-spectest-or-proto

Conversation

@kasey
Copy link
Collaborator

@kasey kasey commented Aug 22, 2023

What type of PR is this?
Other

What does this PR do? Why is it needed?

This PR represents deneb-integration rebased onto deneb-integration-spectest, which builds on deneb-integration-proto. As such the diff for this PR should show the diff for deneb-integration minus the proto and spectests changes, with the goal of making the deneb-integration branch easier to review.

builds on #12772

terencechain and others added 30 commits August 21, 2023 21:53
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Fix Migration Of State (#12423)
* validator signing feature migrated from eip4844 branch, added unit tests

* Update proto/prysm/v1alpha1/beacon_block.proto

---------

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* BlobSidecarsByRoot RPC handler

* BlobSidecarsByRange rpc handler (#12499)

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>

---------

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
@kasey kasey requested a review from a team as a code owner August 22, 2023 02:57
@kasey kasey requested review from potuz, saolyn and terencechain and removed request for a team August 22, 2023 02:57
}
matchedSrcTgt := matchedSrc && matchedTgt
if matchedSrcTgt && delay <= slotsPerEpoch {
// Before Deneb no attestation should pass validation without having delay <= slotsPerEpoch.
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this changed ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

EIP7045

See: #12565

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand the eip, but doesn't this break pre-deneb core code ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No. Because before Deneb, we will fail earlier anyway (See comment). @potuz idea to keep the code clean

params.BeaconConfig().SlotsPerEpoch,
)

if beaconState.Version() < version.Deneb {
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we have validity checks for attestations after deneb ? what happens if we get a very old attestation here

Copy link
Collaborator

Choose a reason for hiding this comment

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

EIP7045

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we not need to validate that it is at least the current or previous epoch ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's verified above. See if data.Target.Epoch != prevEpoch && data.Target.Epoch != currEpoch {

}
attSlotEpoch := slots.ToEpoch(attSlot)
if attSlotEpoch != currentEpoch && attSlotEpoch != prevEpoch {
return fmt.Errorf("attestation slot %d not within current epoch %d or previous epoch %d", attSlot, currentEpoch, prevEpoch)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you follow the error pattern as how above ? With attError

Copy link
Collaborator

Choose a reason for hiding this comment

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

ill take this

Copy link
Collaborator

Choose a reason for hiding this comment

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

return nil, errors.Wrap(err, "could not build block in parallel")
}
} else {
var wg sync.WaitGroup
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be changed back to the flag, otherwise we are removing the feature

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's right. Was hoping we do this at the major release

Copy link
Collaborator

Choose a reason for hiding this comment

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

ill take this

Copy link
Collaborator

Choose a reason for hiding this comment

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

}
// ProposeBeaconBlock is called by a proposer during its assigned slot to create a block in an attempt
// to get it processed by the beacon node as the canonical head.
func (vs *Server) ProposeBeaconBlock(ctx context.Context, req *ethpb.GenericSignedBeaconBlock) (*ethpb.ProposeResponse, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah the whole feature gets wiped out here, most likely was due to a bad rebase

Copy link
Collaborator

Choose a reason for hiding this comment

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

This was intended. I would like to fully remove non build block parallel at a major point release. The reason is that this code path is becoming hard to maintain. Now we will have to write get blobs from both builder and local EL for two paths. I'll think about this more. But that's right we can do this anymore because we are merging to develop now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ill take this

Copy link
Collaborator

Choose a reason for hiding this comment

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

case version.Capella:
fieldRoots = make([][]byte, params.BeaconConfig().BeaconStateCapellaFieldCount)
case version.Deneb:
fieldRoots = make([][]byte, params.BeaconConfig().BeaconStateCapellaFieldCount) // Deneb has the same state field count as Capella.
Copy link
Contributor

Choose a reason for hiding this comment

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

we should still set it as a seprate variable here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

grabbing this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed in #12806

case version.Capella:
fieldCount = params.BeaconConfig().BeaconStateCapellaFieldCount
case version.Deneb:
fieldCount = params.BeaconConfig().BeaconStateCapellaFieldCount
Copy link
Contributor

Choose a reason for hiding this comment

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

same thing here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed in #12806

@@ -61,8 +61,8 @@ func (a *data) PbV2() (*enginev1.PayloadAttributesV2, error) {
if a == nil {
return nil, errNilPayloadAttribute
}
if a.version != version.Capella {
return nil, consensus_types.ErrNotSupported("PayloadAttributePbV2", a.version)
if a.version < version.Capella {
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the conditional changed

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is indeed a bug. PbV2 should be the same for deneb but not anymore

Copy link
Collaborator

Choose a reason for hiding this comment

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

ill take this

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants