Return payload value in Wei from /eth/v3/validator/blocks (#13497)

* Add value in Wei to execution payload

* simplify how payload is returned

* test fix

* fix issues

* review

* fix block handlers
This commit is contained in:
Radosław Kapka
2024-01-24 21:58:35 +01:00
committed by GitHub
parent e397f8a2bd
commit c996109b3a
41 changed files with 1265 additions and 1174 deletions

View File

@@ -2,6 +2,7 @@ package interop
import (
"context"
"math/big"
"github.com/ethereum/go-ethereum/core/types"
"github.com/pkg/errors"
@@ -595,7 +596,7 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
Transactions: make([][]byte, 0),
Withdrawals: make([]*enginev1.Withdrawal, 0),
}
wep, err := blocks.WrappedExecutionPayloadCapella(payload, 0)
wep, err := blocks.WrappedExecutionPayloadCapella(payload, big.NewInt(0))
if err != nil {
return err
}
@@ -603,7 +604,7 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
if err != nil {
return err
}
ed, err = blocks.WrappedExecutionPayloadHeaderCapella(eph, 0)
ed, err = blocks.WrappedExecutionPayloadHeaderCapella(eph, big.NewInt(0))
if err != nil {
return err
}
@@ -627,7 +628,7 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
ExcessBlobGas: *gb.ExcessBlobGas(),
BlobGasUsed: *gb.BlobGasUsed(),
}
wep, err := blocks.WrappedExecutionPayloadDeneb(payload, 0)
wep, err := blocks.WrappedExecutionPayloadDeneb(payload, big.NewInt(0))
if err != nil {
return err
}
@@ -635,7 +636,7 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
if err != nil {
return err
}
ed, err = blocks.WrappedExecutionPayloadHeaderDeneb(eph, 0)
ed, err = blocks.WrappedExecutionPayloadHeaderDeneb(eph, big.NewInt(0))
if err != nil {
return err
}