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

4844: All changes #1798

Closed
wants to merge 60 commits into from
Closed
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
479a264
eip-4844: Blob Transaction type and KZGs
emailtovamos Jun 12, 2023
9ed95d8
Merge pull request #1723 from bnb-chain/develop
brilliant-lx Jun 20, 2023
e03c351
core: types package updates: block,receipt,signing
emailtovamos Jun 20, 2023
9938575
core: core package gaspool & types
emailtovamos Jun 20, 2023
d9e5904
miner: worker.go changes
emailtovamos Jun 20, 2023
ee9b939
core: contracts and ExcessDataGas
emailtovamos Jun 20, 2023
396dd9a
internal: transaction args
emailtovamos Jun 20, 2023
9a6ee55
core: state transition changes for data gas
emailtovamos Jun 22, 2023
c314052
core: blockchain,evm,types,prefetch
emailtovamos Jun 23, 2023
465fb4c
core: transaction type and consensus parlia todo
emailtovamos Jun 23, 2023
d55eae7
eth: backend, accessor, gasprice changes
emailtovamos Jun 23, 2023
e865e99
cmd: evm execution and transition + interfaces
emailtovamos Jun 26, 2023
1272949
accounts: backends simulated changes
emailtovamos Jun 26, 2023
216e455
internal: ethapi api changes
emailtovamos Jun 26, 2023
ff04b10
miner: worker changes for PrefetchMining
emailtovamos Jun 26, 2023
445e444
les: backend and accessor changes
emailtovamos Jun 26, 2023
14b4498
light: ord_util changes
emailtovamos Jun 26, 2023
43fd297
params: config changes with todo
emailtovamos Jun 26, 2023
9a8f79b
tests: state_test_util changes
emailtovamos Jun 26, 2023
db7ff37
Merge branch 'master' into 4844
emailtovamos Jun 26, 2023
b464af1
Merge pull request #1733 from emailtovamos/4844
emailtovamos Jun 26, 2023
a3e5e54
core: remaining genesis related changes
emailtovamos Jun 28, 2023
2f41323
core: all remaining 4844 changes with some todo
emailtovamos Jun 29, 2023
ed0ed98
consensus: Sidecar & BlockAndSidecars structs
emailtovamos Jul 6, 2023
663608e
core: tx_pool changes
emailtovamos Jul 10, 2023
366251f
consensus: interface & implementation for sidecar
emailtovamos Jul 13, 2023
8612c2d
core: consensus changes and todos + conversion
emailtovamos Jul 13, 2023
d5b6907
miner: worker's sidecar related changes
emailtovamos Jul 13, 2023
d72beeb
core: side type change
emailtovamos Jul 25, 2023
1538ed9
signer: ToTransaction() change
emailtovamos Jul 25, 2023
2a270b4
git: exclude tempdatadir
emailtovamos Jul 25, 2023
3ae1e25
cmd: sendblobs main file
emailtovamos Jul 25, 2023
e58a80d
config: include cancuntime
emailtovamos Jul 27, 2023
79ada02
core: state transition bugfix. todo why not before
emailtovamos Aug 2, 2023
146e392
rawdb: added blob sidecar crud for bboltdb
bnb-alexlucaci Aug 8, 2023
c38b64c
rawdb: added blob sidecar crud for leveldb
bnb-alexlucaci Aug 8, 2023
b651d2e
rawdb: added some blob tests
bnb-alexlucaci Aug 8, 2023
985a268
rlp: bug fix attempt which isnt working
emailtovamos Aug 10, 2023
a5b0d01
rlp: insync with go-ethereum
emailtovamos Aug 14, 2023
a6b66b9
ssz: remove all ssz
emailtovamos Aug 14, 2023
7a3cbfa
core: chainid change of type as a test
emailtovamos Aug 14, 2023
59a3083
core: logic change for encoding. todo: size exact
emailtovamos Aug 14, 2023
a45b5be
core: remove decodeTypedMinimal
emailtovamos Aug 15, 2023
b123b3d
core: cleanup of comments and some code
emailtovamos Aug 16, 2023
3abe3e2
Merge pull request #1825 from bnb-chain/4844-rlp-bug
emailtovamos Aug 16, 2023
6919a8b
Merge branch 'feature/4844-blobs-storage' into 4844-add-saving
emailtovamos Aug 18, 2023
f317325
blob: create generic blob storage to store for now
emailtovamos Aug 18, 2023
140fc1a
eth68: implement eth68 without test
emailtovamos Sep 1, 2023
b1b9e64
blob: placing blobdb
emailtovamos Sep 8, 2023
7df23b8
core: excessdatagas bug fix
emailtovamos Sep 8, 2023
bfa8c26
core: networktx as an attempt for bfix
emailtovamos Sep 8, 2023
f9a1f11
p2p: debug logs for bfix
emailtovamos Sep 8, 2023
51befba
core: ignore excessdatagas check + debug logs
emailtovamos Sep 12, 2023
5214969
peer: sidecar propagation with todos
emailtovamos Sep 20, 2023
b5d3028
Merge pull request #1883 from bnb-chain/4844-broadcast
emailtovamos Sep 20, 2023
24665e9
blob: bug fix in decoding
emailtovamos Oct 3, 2023
f3ca030
fetcher: sidecar fetcher code with todos
emailtovamos Oct 3, 2023
35b2652
Merge pull request #1905 from bnb-chain/4844-broadcast
emailtovamos Oct 3, 2023
7f18c92
eth: sidecar sanity check todo
emailtovamos Oct 17, 2023
1753a01
Merge pull request #1924 from bnb-chain/4844-broadcast
emailtovamos Oct 17, 2023
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ cmd/geth/node/
cmd/geth/__debug_bin
cmd/bootnode/bootnode
graphql/__debug_bin

tempdatadir
17 changes: 14 additions & 3 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ func (b *SimulatedBackend) EstimateGas(ctx context.Context, call ethereum.CallMs

// callContract implements common code between normal and pending contract calls.
// state is modified during execution, make sure to copy it if necessary.
// todo(4844?) header instead of block like geth?
func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallMsg, block *types.Block, stateDB *state.StateDB) (*core.ExecutionResult, error) {
// Gas prices post 1559 need to be initialized
if call.GasPrice != nil && (call.GasFeeCap != nil || call.GasTipCap != nil) {
Expand Down Expand Up @@ -627,18 +628,26 @@ func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallM
if call.Value == nil {
call.Value = new(big.Int)
}

// Set infinite balance to the fake caller account.
from := stateDB.GetOrNewStateObject(call.From)
from.SetBalance(math.MaxBig256)
var excessDataGas *big.Int
// Get the last block header
ph := b.blockchain.GetHeaderByHash(block.ParentHash())
if ph != nil {
excessDataGas = ph.ExcessDataGas
}
// Execute the call.
msg := callMsg{call}
// todo check if SkipAccountChecks is really required

txContext := core.NewEVMTxContext(msg)
evmContext := core.NewEVMBlockContext(block.Header(), b.blockchain, nil)
evmContext := core.NewEVMBlockContext(block.Header(), excessDataGas, b.blockchain, nil)
// Create a new environment which holds all relevant information
// about the transaction and calling mechanisms.
vmEnv := vm.NewEVM(evmContext, txContext, stateDB, b.config, vm.Config{NoBaseFee: true})
gasPool := new(core.GasPool).AddGas(math.MaxUint64)
gasPool := new(core.GasPool).AddGas(math.MaxUint64).AddDataGas(params.MaxDataGasPerBlock)

return core.NewStateTransition(vmEnv, msg, gasPool).TransitionDb()
}
Expand All @@ -654,7 +663,7 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transa
return fmt.Errorf("could not fetch parent")
}
// Check transaction validity
signer := types.MakeSigner(b.blockchain.Config(), block.Number())
signer := types.MakeSigner(b.blockchain.Config(), block.Number(), block.Time())
sender, err := types.Sender(signer, tx)
if err != nil {
return fmt.Errorf("invalid transaction: %v", err)
Expand Down Expand Up @@ -823,10 +832,12 @@ func (m callMsg) To() *common.Address { return m.CallMsg.To }
func (m callMsg) GasPrice() *big.Int { return m.CallMsg.GasPrice }
func (m callMsg) GasFeeCap() *big.Int { return m.CallMsg.GasFeeCap }
func (m callMsg) GasTipCap() *big.Int { return m.CallMsg.GasTipCap }
func (m callMsg) MaxFeePerDataGas() *big.Int { return m.CallMsg.MaxFeePerDataGas }
func (m callMsg) Gas() uint64 { return m.CallMsg.Gas }
func (m callMsg) Value() *big.Int { return m.CallMsg.Value }
func (m callMsg) Data() []byte { return m.CallMsg.Data }
func (m callMsg) AccessList() types.AccessList { return m.CallMsg.AccessList }
func (m callMsg) DataHashes() []common.Hash { return m.CallMsg.DataHashes }

// filterBackend implements filters.Backend to support filtering for logs without
// taking bloom-bits acceleration structures into account.
Expand Down
12 changes: 12 additions & 0 deletions accounts/external/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,18 @@ func (api *ExternalSigner) SignTx(account accounts.Account, tx *types.Transactio
case types.DynamicFeeTxType:
args.MaxFeePerGas = (*hexutil.Big)(tx.GasFeeCap())
args.MaxPriorityFeePerGas = (*hexutil.Big)(tx.GasTipCap())
case types.BlobTxType:
hashes, _, blobs, proofs := tx.BlobWrapData()
if len(hashes) != len(blobs) {
return nil, fmt.Errorf("missing blobs data, expected %d blobs", len(hashes))
}
if len(hashes) != len(proofs) {
return nil, fmt.Errorf("missing proofs data, expected %d proofs", len(proofs))
}

args.MaxFeePerGas = (*hexutil.Big)(tx.GasFeeCap())
args.MaxPriorityFeePerGas = (*hexutil.Big)(tx.GasTipCap())
args.Blobs = blobs
default:
return nil, fmt.Errorf("unsupported tx type %d", tx.Type())
}
Expand Down
78 changes: 78 additions & 0 deletions beacon/engine/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,81 @@

// just for prysm compile pass
package engine

import (
"fmt"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
)

// BlobsBundle holds the blobs of an execution payload
type BlobsBundle struct {
Commitments []types.KZGCommitment `json:"commitments" gencodec:"required"`
Blobs []types.Blob `json:"blobs" gencodec:"required"`
Proofs []types.KZGProof `json:"proofs" gencodec:"required"`
}

func BlockToBlobData(block *types.Block) (*BlobsBundle, error) {
blobsBundle := &BlobsBundle{
Blobs: []types.Blob{},
Commitments: []types.KZGCommitment{},
Proofs: []types.KZGProof{},
}
for i, tx := range block.Transactions() {
if tx.Type() == types.BlobTxType {
versionedHashes, commitments, blobs, proofs := tx.BlobWrapData()
if len(versionedHashes) != len(commitments) || len(versionedHashes) != len(blobs) || len(blobs) != len(proofs) {
return nil, fmt.Errorf("tx %d in block %s has inconsistent blobs (%d) / commitments (%d)"+
" / versioned hashes (%d) / proofs (%d)", i, block.Hash(), len(blobs), len(commitments), len(versionedHashes), len(proofs))
}

blobsBundle.Blobs = append(blobsBundle.Blobs, blobs...)
blobsBundle.Commitments = append(blobsBundle.Commitments, commitments...)
blobsBundle.Proofs = append(blobsBundle.Proofs, proofs...)
}
}
return blobsBundle, nil
}

func BlockToSidecars(block *types.Block) ([]*types.Sidecar, error) {
//blobsBundle := &BlobsBundle{
// Blobs: []types.Blob{},
// Commitments: []types.KZGCommitment{},
// Proofs: []types.KZGProof{},
//}

sidecars := make([]*types.Sidecar, 0)

for i, tx := range block.Transactions() {
if tx.Type() == types.BlobTxType {
log.Info("Blob Tx detected...........!!!!!!!!!!!")
versionedHashes, commitments, blobs, proofs := tx.BlobWrapData()
if len(versionedHashes) != len(commitments) || len(versionedHashes) != len(blobs) || len(blobs) != len(proofs) {
return nil, fmt.Errorf("tx %d in block %s has inconsistent blobs (%d) / commitments (%d)"+
" / versioned hashes (%d) / proofs (%d)", i, block.Hash(), len(blobs), len(commitments), len(versionedHashes), len(proofs))
}
blockRoot := block.Root()
blockParentRoot := block.ParentHash()
for index, blob := range blobs {
sidecar := &types.Sidecar{
BlockRoot: blockRoot,
BlockParentRoot: blockParentRoot,
Index: block.NumberU64(),
Blob: blob,
KZGCommitment: commitments[index],
KZGProof: proofs[index],
}
sidecars = append(sidecars, sidecar)
}
log.Info("Sidecars: ", sidecars[0])

//blobsBundle.Blobs = append(blobsBundle.Blobs, blobs...)
//blobsBundle.Commitments = append(blobsBundle.Commitments, commitments...)
//blobsBundle.Proofs = append(blobsBundle.Proofs, proofs...)
}
}

return sidecars, nil
}

//func TransactionsToSidecars(txs []*types.Transaction, )
6 changes: 3 additions & 3 deletions cmd/evm/internal/t8ntool/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ func (i *bbInput) sealEthash(block *types.Block) (*types.Block, error) {
// Use a buffered chan for results.
// If the testmode is used, the sealer will return quickly, and complain
// "Sealing result is not read by miner" if it cannot write the result.
results := make(chan *types.Block, 1)
if err := engine.Seal(nil, block, results, nil); err != nil {
results := make(chan *types.BlockAndSidecars, 1)
if err := engine.Seal(nil, &types.BlockAndSidecars{Block: block}, results, nil); err != nil {
panic(fmt.Sprintf("failed to seal block: %v", err))
}
found := <-results
return block.WithSeal(found.Header()), nil
return block.WithSeal(found.Block.Header()), nil
}

// sealClique seals the given block using clique.
Expand Down
103 changes: 70 additions & 33 deletions cmd/evm/internal/t8ntool/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ type Prestate struct {
// ExecutionResult contains the execution status after running a state test, any
// error that might have occurred and a dump of the final state if requested.
type ExecutionResult struct {
StateRoot common.Hash `json:"stateRoot"`
TxRoot common.Hash `json:"txRoot"`
ReceiptRoot common.Hash `json:"receiptsRoot"`
LogsHash common.Hash `json:"logsHash"`
Bloom types.Bloom `json:"logsBloom" gencodec:"required"`
Receipts types.Receipts `json:"receipts"`
Rejected []*rejectedTx `json:"rejected,omitempty"`
Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"`
GasUsed math.HexOrDecimal64 `json:"gasUsed"`
StateRoot common.Hash `json:"stateRoot"`
TxRoot common.Hash `json:"txRoot"`
ReceiptRoot common.Hash `json:"receiptsRoot"`
LogsHash common.Hash `json:"logsHash"`
Bloom types.Bloom `json:"logsBloom" gencodec:"required"`
Receipts types.Receipts `json:"receipts"`
Rejected []*rejectedTx `json:"rejected,omitempty"`
Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"`
GasUsed math.HexOrDecimal64 `json:"gasUsed"`
ExcessDataGas *math.HexOrDecimal256 `json:"currentExcessDataGas,omitempty"`
}

type ommer struct {
Expand All @@ -65,30 +66,38 @@ type ommer struct {

//go:generate gencodec -type stEnv -field-override stEnvMarshaling -out gen_stenv.go
type stEnv struct {
Coinbase common.Address `json:"currentCoinbase" gencodec:"required"`
Difficulty *big.Int `json:"currentDifficulty"`
Random *big.Int `json:"currentRandom"`
ParentDifficulty *big.Int `json:"parentDifficulty"`
GasLimit uint64 `json:"currentGasLimit" gencodec:"required"`
Number uint64 `json:"currentNumber" gencodec:"required"`
Timestamp uint64 `json:"currentTimestamp" gencodec:"required"`
ParentTimestamp uint64 `json:"parentTimestamp,omitempty"`
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"`
Ommers []ommer `json:"ommers,omitempty"`
BaseFee *big.Int `json:"currentBaseFee,omitempty"`
ParentUncleHash common.Hash `json:"parentUncleHash"`
Coinbase common.Address `json:"currentCoinbase" gencodec:"required"`
Difficulty *big.Int `json:"currentDifficulty"`
Random *big.Int `json:"currentRandom"`
ParentDifficulty *big.Int `json:"parentDifficulty"`
ParentBaseFee *big.Int `json:"parentBaseFee,omitempty"`
ParentGasUsed uint64 `json:"parentGasUsed,omitempty"`
ParentGasLimit uint64 `json:"parentGasLimit,omitempty"`
ParentExcessDataGas *big.Int `json:"parentExcessDataGas,omitempty"`
GasLimit uint64 `json:"currentGasLimit" gencodec:"required"`
Number uint64 `json:"currentNumber" gencodec:"required"`
Timestamp uint64 `json:"currentTimestamp" gencodec:"required"`
ParentTimestamp uint64 `json:"parentTimestamp,omitempty"`
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"`
Ommers []ommer `json:"ommers,omitempty"`
BaseFee *big.Int `json:"currentBaseFee,omitempty"`
ParentUncleHash common.Hash `json:"parentUncleHash"`
}

type stEnvMarshaling struct {
Coinbase common.UnprefixedAddress
Difficulty *math.HexOrDecimal256
Random *math.HexOrDecimal256
ParentDifficulty *math.HexOrDecimal256
GasLimit math.HexOrDecimal64
Number math.HexOrDecimal64
Timestamp math.HexOrDecimal64
ParentTimestamp math.HexOrDecimal64
BaseFee *math.HexOrDecimal256
Coinbase common.UnprefixedAddress
Difficulty *math.HexOrDecimal256
Random *math.HexOrDecimal256
ParentDifficulty *math.HexOrDecimal256
ParentBaseFee *math.HexOrDecimal256
ParentGasUsed math.HexOrDecimal64
ParentGasLimit math.HexOrDecimal64
ParentExcessDataGas *math.HexOrDecimal256
GasLimit math.HexOrDecimal64
Number math.HexOrDecimal64
Timestamp math.HexOrDecimal64
ParentTimestamp math.HexOrDecimal64
BaseFee *math.HexOrDecimal256
}

type rejectedTx struct {
Expand Down Expand Up @@ -117,7 +126,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
}
var (
statedb = MakePreState(rawdb.NewMemoryDatabase(), pre.Pre)
signer = types.MakeSigner(chainConfig, new(big.Int).SetUint64(pre.Env.Number))
signer = types.MakeSigner(chainConfig, new(big.Int).SetUint64(pre.Env.Number), pre.Env.Timestamp)
gaspool = new(core.GasPool)
blockHash = common.Hash{0x13, 0x37}
rejectedTxs []*rejectedTx
Expand All @@ -126,7 +135,9 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
receipts = make(types.Receipts, 0)
txIndex = 0
)
// TODO(4844): Add DataGasLimit to prestate
gaspool.AddGas(pre.Env.GasLimit)
gaspool.AddDataGas(params.MaxDataGasPerBlock)
vmContext := vm.BlockContext{
CanTransfer: core.CanTransfer,
Transfer: core.Transfer,
Expand All @@ -146,6 +157,13 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
rnd := common.BigToHash(pre.Env.Random)
vmContext.Random = &rnd
}
if chainConfig.IsCancun(pre.Env.Timestamp) {
if pre.Env.ParentExcessDataGas != nil {
vmContext.ExcessDataGas = pre.Env.ParentExcessDataGas
} else {
vmContext.ExcessDataGas = big.NewInt(0)
}
}
// If DAO is supported/enabled, we need to handle it here. In geth 'proper', it's
// done in StateProcessor.Process(block, ...), right before transactions are applied.
if chainConfig.DAOForkSupport &&
Expand All @@ -156,6 +174,9 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,

for i, tx := range txs {
msg, err := tx.AsMessage(signer, pre.Env.BaseFee)
if tx.Type() == types.BlobTxType && len(tx.DataHashes()) == 0 {
err = fmt.Errorf("blob transaction with zero blobs")
}
if err != nil {
log.Warn("rejected tx", "index", i, "hash", tx.Hash(), "error", err)
rejectedTxs = append(rejectedTxs, &rejectedTx{i, err.Error()})
Expand All @@ -168,8 +189,12 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
vmConfig.Tracer = tracer
vmConfig.Debug = (tracer != nil)
statedb.Prepare(tx.Hash(), txIndex)
txContext := core.NewEVMTxContext(msg)
snapshot := statedb.Snapshot()
var (
txContext = core.NewEVMTxContext(msg)
snapshot = statedb.Snapshot()
prevGas = gaspool.Gas()
prevDataGas = gaspool.DataGas()
)
evm := vm.NewEVM(vmContext, txContext, statedb, chainConfig, vmConfig)

// (ret []byte, usedGas uint64, failed bool, err error)
Expand All @@ -178,6 +203,8 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
statedb.RevertToSnapshot(snapshot)
log.Info("rejected tx", "index", i, "hash", tx.Hash(), "from", msg.From(), "error", err)
rejectedTxs = append(rejectedTxs, &rejectedTx{i, err.Error()})
gaspool.SetGas(prevGas)
gaspool.SetDataGas(prevDataGas)
continue
}
includedTxs = append(includedTxs, tx)
Expand Down Expand Up @@ -267,6 +294,16 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
Difficulty: (*math.HexOrDecimal256)(vmContext.Difficulty),
GasUsed: (math.HexOrDecimal64)(gasUsed),
}
if vmContext.ExcessDataGas != nil {
// calculate and set the excess data gas at the end of this block execution
newBlobs := 0
for _, tx := range txs {
if tx.Type() == types.BlobTxType {
newBlobs += len(tx.DataHashes())
}
}
execRs.ExcessDataGas = (*math.HexOrDecimal256)(misc.CalcExcessDataGas(vmContext.ExcessDataGas, newBlobs))
}
return statedb, execRs, nil
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/evm/internal/t8ntool/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func Transaction(ctx *cli.Context) error {
return NewError(ErrorIO, errors.New("only rlp supported"))
}
}
signer := types.MakeSigner(chainConfig, new(big.Int))
signer := types.MakeSigner(chainConfig, new(big.Int), 0)
// We now have the transactions in 'body', which is supposed to be an
// rlp list of transactions
it, err := rlp.NewListIterator([]byte(body))
Expand Down
2 changes: 1 addition & 1 deletion cmd/evm/internal/t8ntool/transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func Transition(ctx *cli.Context) error {
}
}
// We may have to sign the transactions.
signer := types.MakeSigner(chainConfig, big.NewInt(int64(prestate.Env.Number)))
signer := types.LatestSignerForChainID(chainConfig.ChainID)

if txs, err = signUnsignedTransactions(txsWithKeys, signer); err != nil {
return NewError(ErrorJson, fmt.Errorf("failed signing transactions: %v", err))
Expand Down
Loading