Skip to content
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
7 changes: 4 additions & 3 deletions ethdb/privateapi/ethbackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,17 @@ func (s *EthBackendServer) EngineNewPayload(ctx context.Context, req *types2.Exe
blockHash := gointerfaces.ConvertH256ToHash(req.BlockHash)
if header.Hash() != blockHash {
log.Error("[NewPayload] invalid block hash", "stated", libcommon.Hash(blockHash), "actual", header.Hash())
return &remote.EnginePayloadStatus{Status: remote.EngineStatus_INVALID_BLOCK_HASH}, nil
return &remote.EnginePayloadStatus{
Status: remote.EngineStatus_INVALID,
ValidationError: "invalid block hash",
}, nil
}

for _, txn := range req.Transactions {
if types.TypedTransactionMarshalledAsRlpString(txn) {
log.Warn("[NewPayload] typed txn marshalled as RLP string", "txn", common.Bytes2Hex(txn))
return &remote.EnginePayloadStatus{
Status: remote.EngineStatus_INVALID,
LatestValidHash: nil,
ValidationError: "typed txn marshalled as RLP string",
}, nil
}
Expand All @@ -338,7 +340,6 @@ func (s *EthBackendServer) EngineNewPayload(ctx context.Context, req *types2.Exe
log.Warn("[NewPayload] failed to decode transactions", "err", err)
return &remote.EnginePayloadStatus{
Status: remote.EngineStatus_INVALID,
LatestValidHash: nil,
ValidationError: err.Error(),
}, nil
}
Expand Down