forked from forks/go-ethereum
beacon/blsync: fix requests encoding in engine_newPayloadV4 (#31775)
This fixes an issue where blocks containing CL requests triggered an error in the engine API. The encoding of requests used base64 instead of hex.
This commit is contained in:
parent
51b34efebc
commit
3e356d69ef
1 changed files with 6 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/beacon/params"
|
||||
"github.com/ethereum/go-ethereum/beacon/types"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
ctypes "github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
|
|
@ -104,7 +105,11 @@ func (ec *engineClient) callNewPayload(fork string, event types.ChainHeadEvent)
|
|||
method = "engine_newPayloadV4"
|
||||
parentBeaconRoot := event.BeaconHead.ParentRoot
|
||||
blobHashes := collectBlobHashes(event.Block)
|
||||
params = append(params, blobHashes, parentBeaconRoot, event.ExecRequests)
|
||||
hexRequests := make([]hexutil.Bytes, len(event.ExecRequests))
|
||||
for i := range event.ExecRequests {
|
||||
hexRequests[i] = hexutil.Bytes(event.ExecRequests[i])
|
||||
}
|
||||
params = append(params, blobHashes, parentBeaconRoot, hexRequests)
|
||||
case "deneb":
|
||||
method = "engine_newPayloadV3"
|
||||
parentBeaconRoot := event.BeaconHead.ParentRoot
|
||||
|
|
|
|||
Loading…
Reference in a new issue