eip-4844: hive tests: RLP decode order and newPayloadV3 to expect versionedHashes (#7943)

This commit is contained in:
racytech 2023-07-30 19:49:31 +06:00 committed by GitHub
parent b50f427641
commit af884204cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -78,7 +78,7 @@ func (cc *ExecutionClientDirect) NewPayload(payload *cltypes.Eth1Block) (invalid
case clparams.CapellaVersion:
payloadStatus, err = cc.api.NewPayloadV2(cc.ctx, &request)
case clparams.DenebVersion:
payloadStatus, err = cc.api.NewPayloadV3(cc.ctx, &request)
payloadStatus, err = cc.api.NewPayloadV3(cc.ctx, &request, nil)
default:
err = fmt.Errorf("invalid payload version")
}

View File

@ -460,11 +460,11 @@ func (txw *BlobTxWrapper) DecodeRLP(s *rlp.Stream) error {
return err
}
if err := txw.Commitments.DecodeRLP(s); err != nil {
if err := txw.Blobs.DecodeRLP(s); err != nil {
return err
}
if err := txw.Blobs.DecodeRLP(s); err != nil {
if err := txw.Commitments.DecodeRLP(s); err != nil {
return err
}

View File

@ -598,7 +598,7 @@ func (e *EngineServer) NewPayloadV2(ctx context.Context, payload *engine_types.E
// NewPayloadV3 processes new payloads (blocks) from the beacon chain with withdrawals & blob gas.
// See https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md#engine_newpayloadv3
func (e *EngineServer) NewPayloadV3(ctx context.Context, payload *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error) {
func (e *EngineServer) NewPayloadV3(ctx context.Context, payload *engine_types.ExecutionPayload, versionedHashes []libcommon.Hash) (*engine_types.PayloadStatus, error) {
return e.newPayload(ctx, payload, clparams.DenebVersion)
}

View File

@ -623,7 +623,7 @@ func (e *EngineServerExperimental) NewPayloadV2(ctx context.Context, payload *en
// NewPayloadV3 processes new payloads (blocks) from the beacon chain with withdrawals & blob gas.
// See https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md#engine_newpayloadv3
func (e *EngineServerExperimental) NewPayloadV3(ctx context.Context, payload *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error) {
func (e *EngineServerExperimental) NewPayloadV3(ctx context.Context, payload *engine_types.ExecutionPayload, versionedHashes []libcommon.Hash) (*engine_types.PayloadStatus, error) {
return e.newPayload(ctx, payload, clparams.DenebVersion)
}

View File

@ -13,7 +13,7 @@ import (
type EngineAPI interface {
NewPayloadV1(context.Context, *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error)
NewPayloadV2(context.Context, *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error)
NewPayloadV3(context.Context, *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error)
NewPayloadV3(context.Context, *engine_types.ExecutionPayload, []common.Hash) (*engine_types.PayloadStatus, error)
ForkchoiceUpdatedV1(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, payloadAttributes *engine_types.PayloadAttributes) (*engine_types.ForkChoiceUpdatedResponse, error)
ForkchoiceUpdatedV2(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, payloadAttributes *engine_types.PayloadAttributes) (*engine_types.ForkChoiceUpdatedResponse, error)
GetPayloadV1(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.ExecutionPayload, error)