migrating get blob from eip4844 and deneb-integration (#12603)

This commit is contained in:
james-prysm
2023-07-10 14:02:44 -05:00
committed by Preston Van Loon
parent 6050501eb1
commit a41c01cb5e
41 changed files with 1211 additions and 254 deletions

View File

@@ -360,6 +360,10 @@ func BuildSignedBeaconBlockFromExecutionPayload(
// This is particularly useful for using the values from API calls.
func BeaconBlockContainerToSignedBeaconBlock(obj *eth.BeaconBlockContainer) (interfaces.ReadOnlySignedBeaconBlock, error) {
switch obj.Block.(type) {
case *eth.BeaconBlockContainer_BlindedDenebBlock:
return NewSignedBeaconBlock(obj.GetBlindedDenebBlock())
case *eth.BeaconBlockContainer_DenebBlock:
return NewSignedBeaconBlock(obj.GetDenebBlock())
case *eth.BeaconBlockContainer_BlindedCapellaBlock:
return NewSignedBeaconBlock(obj.GetBlindedCapellaBlock())
case *eth.BeaconBlockContainer_CapellaBlock:

View File

@@ -61,7 +61,7 @@ func (a *data) PbV2() (*enginev1.PayloadAttributesV2, error) {
if a == nil {
return nil, errNilPayloadAttribute
}
if a.version != version.Capella {
if a.version < version.Capella {
return nil, consensus_types.ErrNotSupported("PayloadAttributePbV2", a.version)
}
if a.timeStamp == 0 && len(a.prevRandao) == 0 {