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

Communicate IL with EL in hex #14894

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions beacon-chain/execution/engine_client_focil.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/ethereum/go-ethereum/beacon/engine"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/prysmaticlabs/prysm/v5/config/params"
"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace"
Expand Down Expand Up @@ -33,13 +34,18 @@ func (s *Service) GetInclusionList(ctx context.Context, parentHash [32]byte) ([]
ctx, cancel := context.WithDeadline(ctx, time.Now().Add(timeout))
defer cancel()

var result [][]byte
var result []hexutil.Bytes
err := s.rpcClient.CallContext(ctx, &result, GetInclusionListV1, common.Hash(parentHash))
if err != nil {
return nil, handleRPCError(err)
}

return result, nil
bytesResult := make([][]byte, len(result))
for i, b := range result {
bytesResult[i] = b
}

return bytesResult, nil
}

// UpdatePayloadWithInclusionList updates a payload with a provided inclusion list of transactions.
Expand All @@ -58,8 +64,13 @@ func (s *Service) UpdatePayloadWithInclusionList(ctx context.Context, payloadID
ctx, cancel := context.WithDeadline(ctx, time.Now().Add(timeout))
defer cancel()

hexTxs := make([]hexutil.Bytes, len(txs))
for i, tx := range txs {
hexTxs[i] = tx
}

result := &engine.PayloadID{}
err := s.rpcClient.CallContext(ctx, result, UpdatePayloadWithInclusionListV1, engine.PayloadID(payloadID), txs)
err := s.rpcClient.CallContext(ctx, result, UpdatePayloadWithInclusionListV1, engine.PayloadID(payloadID), hexTxs)
if err != nil {
return nil, handleRPCError(err)
}
Expand Down
Loading