Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion cannon/mipsevm/testutil/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func NewEVMEnv(t testing.TB, contracts *ContractMetadata) (*vm.EVM, *state.State

env := vm.NewEVM(blockContext, state, chainCfg, vmCfg)
// pre-deploy the contracts
env.StateDB.SetCode(contracts.Addresses.Oracle, contracts.Artifacts.Oracle.DeployedBytecode.Object)
env.StateDB.SetCode(contracts.Addresses.Oracle, contracts.Artifacts.Oracle.DeployedBytecode.Object, tracing.CodeChangeUnspecified)

var ctorArgs []byte
if contracts.Version == 0 { // Old MIPS.sol doesn't specify the state version in the constructor
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ require (
github.com/containerd/log v0.1.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/dchest/siphash v1.2.3 // indirect
Expand All @@ -122,7 +122,7 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/elastic/gosigar v0.14.3 // indirect
github.com/emicklei/dot v1.6.2 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.3 // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/felixge/fgprof v0.9.5 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand Down Expand Up @@ -157,7 +157,7 @@ require (
github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/hashicorp/golang-lru/arc/v2 v2.0.7 // indirect
github.com/hashicorp/raft-boltdb v0.0.0-20231211162105-6c830fa4535e // indirect
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect
github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect
Expand Down Expand Up @@ -259,7 +259,7 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/supranational/blst v0.3.14 // indirect
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.8.0 // indirect
Expand Down Expand Up @@ -303,7 +303,7 @@ require (
lukechampine.com/blake3 v1.3.0 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.0-rc.1
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.0-synctest.0.0.20250929230549-67100a33332e

// replace github.com/ethereum/go-ethereum => ../op-geth

Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI=
github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI=
github.com/crate-crypto/go-eth-kzg v1.4.0 h1:WzDGjHk4gFg6YzV0rJOAsTK4z3Qkz5jd4RE3DAvPFkg=
github.com/crate-crypto/go-eth-kzg v1.4.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI=
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg=
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM=
github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4=
Expand Down Expand Up @@ -230,12 +230,12 @@ github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A=
github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs=
github.com/ethereum-optimism/op-geth v1.101603.0-rc.1 h1:gTAlQu6QwaZyG2hW6fDhLkXeftVNHC5RCl4P0eBXH8U=
github.com/ethereum-optimism/op-geth v1.101603.0-rc.1/go.mod h1:Ct2QjqZ2UKgvvgKLLYzoh/DBicJZB8DXsv45DgEjcco=
github.com/ethereum-optimism/op-geth v1.101603.0-synctest.0.0.20250929230549-67100a33332e h1:iLpEZvgQ4pJsNyO7V1B804OnV8iO0GpVwGmWF68sYiI=
github.com/ethereum-optimism/op-geth v1.101603.0-synctest.0.0.20250929230549-67100a33332e/go.mod h1:oFgPDyaebT3WF8ohCKIRN4eJuhwqNRinQRYKoLkWk2A=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250603144016-9c45ca7d4508 h1:A/3QVFt+Aa9ozpPVXxUTLui8honBjSusAaiCVRbafgs=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250603144016-9c45ca7d4508/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y=
github.com/ethereum/c-kzg-4844/v2 v2.1.0 h1:gQropX9YFBhl3g4HYhwE70zq3IHFRgbbNPw0Shwzf5w=
github.com/ethereum/c-kzg-4844/v2 v2.1.0/go.mod h1:TC48kOKjJKPbN7C++qIgt0TJzZ70QznYR7Ob+WXl57E=
github.com/ethereum/c-kzg-4844/v2 v2.1.3 h1:DQ21UU0VSsuGy8+pcMJHDS0CV1bKmJmxsJYK8l3MiLU=
github.com/ethereum/c-kzg-4844/v2 v2.1.3/go.mod h1:fyNcYI/yAuLWJxf4uzVtS8VDKeoAaRM8G/+ADz/pRdA=
github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8=
github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
Expand Down Expand Up @@ -420,8 +420,8 @@ github.com/hashicorp/raft-boltdb v0.0.0-20231211162105-6c830fa4535e h1:SK4y8oR4Z
github.com/hashicorp/raft-boltdb v0.0.0-20231211162105-6c830fa4535e/go.mod h1:EMz/UIuG93P0MBeHh6CbXQAEe8ckVJLZjhD17lBzK5Q=
github.com/hashicorp/raft-boltdb/v2 v2.3.1 h1:ackhdCNPKblmOhjEU9+4lHSJYFkJd6Jqyvj6eW9pwkc=
github.com/hashicorp/raft-boltdb/v2 v2.3.1/go.mod h1:n4S+g43dXF1tqDT+yzcXHhXM6y7MrlUd3TTwGRcUvQE=
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4=
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc=
github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db h1:IZUYC/xb3giYwBLMnr8d0TGTzPKFGNTCGgGLoyeX330=
github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db/go.mod h1:xTEYN9KCHxuYHs+NmrmzFcnvHMzLLNiGFafCb1n3Mfg=
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA=
github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA=
Expand Down Expand Up @@ -881,8 +881,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo=
github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe h1:nbdqkIGOGfUAD54q1s2YBcBz/WcsxCO9HUQ4aGV5hUw=
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5fl+nylMaIr9PVV1w343YRDtsy+Rwu7XI=
Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/cmd/op-simulate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func simulate(ctx context.Context, logger log.Logger, conf *params.ChainConfig,
state.CreateAccount(addr)
state.SetBalance(addr, uint256.MustFromBig((*big.Int)(&acc.Balance)), tracing.BalanceChangeUnspecified)
state.SetNonce(addr, acc.Nonce, tracing.NonceChangeUnspecified)
state.SetCode(addr, acc.Code)
state.SetCode(addr, acc.Code, tracing.CodeChangeUnspecified)
state.SetStorage(addr, acc.Storage)
}

Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/foundry/allocs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestForgeAllocs_FromState(t *testing.T) {
st.CreateContract(contract)
st.SetNonce(contract, 30, tracing.NonceChangeUnspecified)
st.SetBalance(contract, uint256.NewInt(0), tracing.BalanceChangeUnspecified)
st.SetCode(contract, []byte{10, 11, 12, 13, 14})
st.SetCode(contract, []byte{10, 11, 12, 13, 14}, tracing.CodeChangeUnspecified)

// Commit and make a new state, we cannot reuse the state after Commit
// (see doc-comment in Commit, absolute footgun)
Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/script/cheatcodes_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (c *CheatCodesPrecompile) Load(account common.Address, slot [32]byte) [32]b

// Etch implements https://book.getfoundry.sh/cheatcodes/etch
func (c *CheatCodesPrecompile) Etch(who common.Address, code []byte) {
c.h.state.SetCode(who, bytes.Clone(code)) // important to clone; geth EVM will reuse the calldata memory.
c.h.state.SetCode(who, bytes.Clone(code), tracing.CodeChangeUnspecified) // important to clone; geth EVM will reuse the calldata memory.
if len(code) > 0 {
// if we're not just zeroing out the account: allow it to access cheatcodes
c.h.AllowCheatcodes(who)
Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/script/forking/forking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func TestForking(t *testing.T) {
forkState.SetBalance(alice, uint256.NewInt(100_000), tracing.BalanceChangeUnspecified)
forkState.SetState(alice, common.Hash{4}, common.Hash{42})
forkState.SetState(alice, common.Hash{5}, common.Hash{100})
forkState.SetCode(alice, []byte("hello world"))
forkState.SetCode(alice, []byte("hello world"), tracing.CodeChangeUnspecified)

// Check the name
name, err = forkState.ForkURLOrAlias(forkC)
Expand Down
4 changes: 2 additions & 2 deletions op-chain-ops/script/forking/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ func (fst *ForkableState) GetCode(address common.Address) []byte {
return fst.stateFor(address).GetCode(address)
}

func (fst *ForkableState) SetCode(address common.Address, bytes []byte) []byte {
return fst.stateFor(address).SetCode(address, bytes)
func (fst *ForkableState) SetCode(address common.Address, bytes []byte, reason tracing.CodeChangeReason) []byte {
return fst.stateFor(address).SetCode(address, bytes, reason)
}

func (fst *ForkableState) GetCodeSize(address common.Address) int {
Expand Down
8 changes: 4 additions & 4 deletions op-chain-ops/script/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func (h *Host) EnableCheats() error {
// Solidity does EXTCODESIZE checks on functions without return-data.
// We need to insert some placeholder code to prevent it from aborting calls.
// Emulates Forge script: https://github.com/foundry-rs/foundry/blob/224fe9cbf76084c176dabf7d3b2edab5df1ab818/crates/evm/evm/src/executors/mod.rs#L108
h.state.SetCode(addresses.VMAddr, []byte{0x00})
h.state.SetCode(addresses.VMAddr, []byte{0x00}, tracing.CodeChangeUnspecified)
h.precompiles[addresses.VMAddr] = h.cheatcodes

consolePrecompile, err := NewPrecompile[*ConsolePrecompile](&ConsolePrecompile{
Expand Down Expand Up @@ -437,7 +437,7 @@ func (h *Host) Create(from common.Address, initCode []byte) (common.Address, err
// Note that storage is not removed.
func (h *Host) Wipe(addr common.Address) {
if h.state.GetCodeSize(addr) > 0 {
h.state.SetCode(addr, nil)
h.state.SetCode(addr, nil, tracing.CodeChangeUnspecified)
}
h.state.SetNonce(addr, 0, tracing.NonceChangeUnspecified)
h.state.SetBalance(addr, uint256.NewInt(0), tracing.BalanceChangeUnspecified)
Expand Down Expand Up @@ -476,7 +476,7 @@ func (h *Host) ImportAccount(addr common.Address, account types.Account) {
}
h.state.SetBalance(addr, balance, tracing.BalanceChangeUnspecified)
h.state.SetNonce(addr, account.Nonce, tracing.NonceChangeUnspecified)
h.state.SetCode(addr, account.Code)
h.state.SetCode(addr, account.Code, tracing.CodeChangeUnspecified)
for key, value := range account.Storage {
h.state.SetState(addr, key, value)
}
Expand Down Expand Up @@ -506,7 +506,7 @@ func (h *Host) SetPrecompile(addr common.Address, precompile vm.PrecompiledContr
h.log.Debug("adding precompile", "addr", addr)
h.precompiles[addr] = precompile
// insert non-empty placeholder bytecode, so EXTCODESIZE checks pass
h.state.SetCode(addr, []byte{0})
h.state.SetCode(addr, []byte{0}, tracing.CodeChangeUnspecified)
}

// HasPrecompileOverride inspects if there exists an active precompile-override at the given address.
Expand Down
6 changes: 3 additions & 3 deletions op-e2e/e2eutils/fakebeacon/blobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (f *FakeBeacon) Start(addr string) error {
return nil
}

func (f *FakeBeacon) StoreBlobsBundle(slot uint64, bundle *engine.BlobsBundleV1) error {
func (f *FakeBeacon) StoreBlobsBundle(slot uint64, bundle *engine.BlobsBundle) error {
f.blobsLock.Lock()
defer f.blobsLock.Unlock()

Expand All @@ -179,7 +179,7 @@ func (f *FakeBeacon) StoreBlobsBundle(slot uint64, bundle *engine.BlobsBundleV1)
return nil
}

func (f *FakeBeacon) LoadBlobsBundle(slot uint64) (*engine.BlobsBundleV1, error) {
func (f *FakeBeacon) LoadBlobsBundle(slot uint64) (*engine.BlobsBundle, error) {
f.blobsLock.Lock()
defer f.blobsLock.Unlock()

Expand All @@ -195,7 +195,7 @@ func (f *FakeBeacon) LoadBlobsBundle(slot uint64) (*engine.BlobsBundleV1, error)
}

// Convert blobs to the bundle
out := engine.BlobsBundleV1{
out := engine.BlobsBundle{
Commitments: make([]hexutil.Bytes, len(blobs)),
Proofs: make([]hexutil.Bytes, len(blobs)),
Blobs: make([]hexutil.Bytes, len(blobs)),
Expand Down
2 changes: 1 addition & 1 deletion op-e2e/e2eutils/geth/fakepos.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

type Beacon interface {
StoreBlobsBundle(slot uint64, bundle *engine.BlobsBundleV1) error
StoreBlobsBundle(slot uint64, bundle *engine.BlobsBundle) error
}

// fakePoS is a testing-only utility to attach to Geth,
Expand Down
2 changes: 1 addition & 1 deletion op-program/client/l2/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func TestUpdateState(t *testing.T) {

statedb.SetBalance(unknownAccount, uint256.NewInt(60), tracing.BalanceChangeUnspecified)
require.Equal(t, uint256.NewInt(60), statedb.GetBalance(unknownAccount))
statedb.SetCode(codeAccount, []byte{1})
statedb.SetCode(codeAccount, []byte{1}, tracing.CodeChangeUnspecified)
require.Equal(t, []byte{1}, statedb.GetCode(codeAccount))

// Changes should be available under the new state root after committing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

type Beacon interface {
StoreBlobsBundle(slot uint64, bundle *engine.BlobsBundleV1) error
StoreBlobsBundle(slot uint64, bundle *engine.BlobsBundle) error
}

type Blockchain interface {
Expand Down
2 changes: 1 addition & 1 deletion op-wheel/cheat/cheat.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func SetBalance(addr common.Address, amount *big.Int) HeadFn {

func SetCode(addr common.Address, code hexutil.Bytes) HeadFn {
return func(_ *types.Header, headState *state.StateDB) error {
headState.SetCode(addr, code)
headState.SetCode(addr, code, tracing.CodeChangeUnspecified)
return nil
}
}
Expand Down