|
|
@ -28,6 +28,7 @@ import ( |
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil" |
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil" |
|
|
|
"github.com/ethereum/go-ethereum/common/math" |
|
|
|
"github.com/ethereum/go-ethereum/common/math" |
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/consensus/misc/eip4844" |
|
|
|
"github.com/ethereum/go-ethereum/core" |
|
|
|
"github.com/ethereum/go-ethereum/core" |
|
|
|
"github.com/ethereum/go-ethereum/core/rawdb" |
|
|
|
"github.com/ethereum/go-ethereum/core/rawdb" |
|
|
|
"github.com/ethereum/go-ethereum/core/state" |
|
|
|
"github.com/ethereum/go-ethereum/core/state" |
|
|
@ -90,6 +91,7 @@ type stEnv struct { |
|
|
|
Number uint64 `json:"currentNumber" gencodec:"required"` |
|
|
|
Number uint64 `json:"currentNumber" gencodec:"required"` |
|
|
|
Timestamp uint64 `json:"currentTimestamp" gencodec:"required"` |
|
|
|
Timestamp uint64 `json:"currentTimestamp" gencodec:"required"` |
|
|
|
BaseFee *big.Int `json:"currentBaseFee" gencodec:"optional"` |
|
|
|
BaseFee *big.Int `json:"currentBaseFee" gencodec:"optional"` |
|
|
|
|
|
|
|
ExcessBlobGas *uint64 `json:"currentExcessBlobGas" gencodec:"optional"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type stEnvMarshaling struct { |
|
|
|
type stEnvMarshaling struct { |
|
|
@ -100,6 +102,7 @@ type stEnvMarshaling struct { |
|
|
|
Number math.HexOrDecimal64 |
|
|
|
Number math.HexOrDecimal64 |
|
|
|
Timestamp math.HexOrDecimal64 |
|
|
|
Timestamp math.HexOrDecimal64 |
|
|
|
BaseFee *math.HexOrDecimal256 |
|
|
|
BaseFee *math.HexOrDecimal256 |
|
|
|
|
|
|
|
ExcessBlobGas *math.HexOrDecimal64 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//go:generate go run github.com/fjl/gencodec -type stTransaction -field-override stTransactionMarshaling -out gen_sttransaction.go
|
|
|
|
//go:generate go run github.com/fjl/gencodec -type stTransaction -field-override stTransactionMarshaling -out gen_sttransaction.go
|
|
|
@ -283,6 +286,9 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh |
|
|
|
context.Random = &rnd |
|
|
|
context.Random = &rnd |
|
|
|
context.Difficulty = big.NewInt(0) |
|
|
|
context.Difficulty = big.NewInt(0) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if config.IsCancun(new(big.Int), block.Time()) && t.json.Env.ExcessBlobGas != nil { |
|
|
|
|
|
|
|
context.BlobBaseFee = eip4844.CalcBlobFee(*t.json.Env.ExcessBlobGas) |
|
|
|
|
|
|
|
} |
|
|
|
evm := vm.NewEVM(context, txContext, statedb, config, vmconfig) |
|
|
|
evm := vm.NewEVM(context, txContext, statedb, config, vmconfig) |
|
|
|
|
|
|
|
|
|
|
|
// Execute the message.
|
|
|
|
// Execute the message.
|
|
|
|