mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-08 09:11:34 +00:00
core: update to newest test cases
This commit is contained in:
parent
a74438510b
commit
ed0af73154
3 changed files with 4 additions and 14 deletions
|
|
@ -5,10 +5,10 @@
|
||||||
# https://github.com/ethereum/execution-spec-tests/releases/download/v5.1.0
|
# https://github.com/ethereum/execution-spec-tests/releases/download/v5.1.0
|
||||||
a3192784375acec7eaec492799d5c5d0c47a2909a3cc40178898e4ecd20cc416 fixtures_develop.tar.gz
|
a3192784375acec7eaec492799d5c5d0c47a2909a3cc40178898e4ecd20cc416 fixtures_develop.tar.gz
|
||||||
|
|
||||||
# version:spec-tests-bal v5.3.0
|
# version:spec-tests-bal v5.4.0
|
||||||
# https://github.com/ethereum/execution-spec-tests/releases
|
# https://github.com/ethereum/execution-spec-tests/releases
|
||||||
# https://github.com/ethereum/execution-spec-tests/releases/download/bal%40v5.3.0
|
# https://github.com/ethereum/execution-spec-tests/releases/download/bal%40v5.4.0
|
||||||
a1840f2e74d7d53f9f36f969bfd280407829b21e85bea206ba907453fdc47ac4 fixtures_bal.tar.gz
|
be300cbc5dcae213850bc5688d8fd0f572785ec64801f28653e1c01a03805127 fixtures_bal.tar.gz
|
||||||
|
|
||||||
# version:golang 1.25.7
|
# version:golang 1.25.7
|
||||||
# https://go.dev/dl/
|
# https://go.dev/dl/
|
||||||
|
|
|
||||||
|
|
@ -603,7 +603,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
|
||||||
// tx_state = adjusted_intrinsic_state + exec_state_used (spec: set_delegation adjusts intrinsic)
|
// tx_state = adjusted_intrinsic_state + exec_state_used (spec: set_delegation adjusts intrinsic)
|
||||||
// tx_regular = total_dimensional_used - tx_state
|
// tx_regular = total_dimensional_used - tx_state
|
||||||
txState := (gas.StateGas - authRefund) + st.gasRemaining.StateGasCharged
|
txState := (gas.StateGas - authRefund) + st.gasRemaining.StateGasCharged
|
||||||
txRegular := (msg.GasLimit - preRefundRemaining) - txState - st.evm.CollisionBurned
|
txRegular := (msg.GasLimit - preRefundRemaining) - txState
|
||||||
txRegular = max(txRegular, floorDataGas)
|
txRegular = max(txRegular, floorDataGas)
|
||||||
if err := st.gp.ReturnGasAmsterdam(returned, txRegular, txState, st.gasUsed()); err != nil {
|
if err := st.gp.ReturnGasAmsterdam(returned, txRegular, txState, st.gasUsed()); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
|
|
@ -129,14 +129,6 @@ type EVM struct {
|
||||||
|
|
||||||
readOnly bool // Whether to throw on stateful modifications
|
readOnly bool // Whether to throw on stateful modifications
|
||||||
returnData []byte // Last CALL's return data for subsequent reuse
|
returnData []byte // Last CALL's return data for subsequent reuse
|
||||||
|
|
||||||
// CollisionBurned accumulates regular gas burned in CREATE/CREATE2 address
|
|
||||||
// collisions. The spec burns this gas (deducts from gas_left) but does NOT
|
|
||||||
// count it in regular_gas_used, so it must be excluded from txRegular in
|
|
||||||
// 2D block gas accounting.
|
|
||||||
// TODO (MariusVanDerWijden) this seems to be the best way to conform to the current
|
|
||||||
// spec, I wonder if it makes sense to change the spec.
|
|
||||||
CollisionBurned uint64
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewEVM constructs an EVM instance with the supplied block context, state
|
// NewEVM constructs an EVM instance with the supplied block context, state
|
||||||
|
|
@ -225,7 +217,6 @@ func (evm *EVM) SetTxContext(txCtx TxContext) {
|
||||||
txCtx.AccessEvents = state.NewAccessEvents()
|
txCtx.AccessEvents = state.NewAccessEvents()
|
||||||
}
|
}
|
||||||
evm.TxContext = txCtx
|
evm.TxContext = txCtx
|
||||||
evm.CollisionBurned = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cancel cancels any running EVM operation. This may be called concurrently and
|
// Cancel cancels any running EVM operation. This may be called concurrently and
|
||||||
|
|
@ -558,7 +549,6 @@ func (evm *EVM) create(caller common.Address, code []byte, gas GasCosts, value *
|
||||||
if evm.Config.Tracer != nil && evm.Config.Tracer.OnGasChange != nil {
|
if evm.Config.Tracer != nil && evm.Config.Tracer.OnGasChange != nil {
|
||||||
evm.Config.Tracer.OnGasChange(gas.RegularGas, 0, tracing.GasChangeCallFailedExecution)
|
evm.Config.Tracer.OnGasChange(gas.RegularGas, 0, tracing.GasChangeCallFailedExecution)
|
||||||
}
|
}
|
||||||
evm.CollisionBurned += gas.RegularGas
|
|
||||||
gas.RegularGas = 0
|
gas.RegularGas = 0
|
||||||
return nil, common.Address{}, gas, ErrContractAddressCollision
|
return nil, common.Address{}, gas, ErrContractAddressCollision
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue