mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-21 02:18:07 +00:00
core/vm: more fixes from ai
This commit is contained in:
parent
6489aab697
commit
da4700411e
2 changed files with 15 additions and 3 deletions
|
|
@ -5,10 +5,10 @@
|
|||
# https://github.com/ethereum/execution-spec-tests/releases/download/v5.1.0
|
||||
a3192784375acec7eaec492799d5c5d0c47a2909a3cc40178898e4ecd20cc416 fixtures_develop.tar.gz
|
||||
|
||||
# version:spec-tests-bal v5.2.0
|
||||
# version:spec-tests-bal v5.3.0
|
||||
# https://github.com/ethereum/execution-spec-tests/releases
|
||||
# https://github.com/ethereum/execution-spec-tests/releases/download/bal%40v5.2.0
|
||||
a0dc6f4070da4dab4831f4e8fddfc087c10a5120a6a683257e963d9c6713378a fixtures_bal.tar.gz
|
||||
# https://github.com/ethereum/execution-spec-tests/releases/download/bal%40v5.3.0
|
||||
a1840f2e74d7d53f9f36f969bfd280407829b21e85bea206ba907453fdc47ac4 fixtures_bal.tar.gz
|
||||
|
||||
# version:golang 1.25.7
|
||||
# https://go.dev/dl/
|
||||
|
|
|
|||
|
|
@ -703,6 +703,12 @@ func opCreate(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
|
|||
returnGas.RevertedStateGasSpill = 0
|
||||
returnGas.StateGas = stateGas
|
||||
}
|
||||
// On address collision, child's regular gas is consumed (not returned).
|
||||
// Track as RevertedStateGasSpill so block 2D accounting is unaffected.
|
||||
if evm.chainRules.IsAmsterdam && errors.Is(suberr, ErrContractAddressCollision) {
|
||||
returnGas.RevertedStateGasSpill += returnGas.RegularGas
|
||||
returnGas.RegularGas = 0
|
||||
}
|
||||
scope.Contract.RefundGas(returnGas, evm.Config.Tracer, tracing.GasChangeCallLeftOverRefunded)
|
||||
|
||||
if suberr == ErrExecutionReverted {
|
||||
|
|
@ -763,6 +769,12 @@ func opCreate2(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
|
|||
returnGas.RevertedStateGasSpill = 0
|
||||
returnGas.StateGas = stateGas
|
||||
}
|
||||
// On address collision, child's regular gas is consumed (not returned).
|
||||
// Track as RevertedStateGasSpill so block 2D accounting is unaffected.
|
||||
if evm.chainRules.IsAmsterdam && errors.Is(suberr, ErrContractAddressCollision) {
|
||||
returnGas.RevertedStateGasSpill += returnGas.RegularGas
|
||||
returnGas.RegularGas = 0
|
||||
}
|
||||
scope.Contract.RefundGas(returnGas, evm.Config.Tracer, tracing.GasChangeCallLeftOverRefunded)
|
||||
|
||||
if suberr == ErrExecutionReverted {
|
||||
|
|
|
|||
Loading…
Reference in a new issue