Skip to content

Commit ede69a6

Browse files
authored
update for new op-geth version (#5)
(cherry picked from commit 0b09e1c)
1 parent 47bf007 commit ede69a6

File tree

7 files changed

+195
-99
lines changed

7 files changed

+195
-99
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ require (
250250
rsc.io/tmplfunc v0.0.3 // indirect
251251
)
252252

253-
replace github.com/ethereum/go-ethereum v1.14.8 => github.com/paradigmxyz/op-geth v0.0.0-20240912202626-841fcd6ec768
253+
replace github.com/ethereum/go-ethereum => github.com/paradigmxyz/op-geth v0.0.0-20250124010715-5401c129acb0
254254

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

go.sum

Lines changed: 183 additions & 88 deletions
Large diffs are not rendered by default.

op-chain-ops/cmd/check-derivation/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func getRandomSignedTransaction(ctx context.Context, ethClient *ethclient.Client
225225
var txData types.TxData
226226
switch txType {
227227
case types.LegacyTxType:
228-
gasLimit, err := core.IntrinsicGas(data, nil, false, true, true, false)
228+
gasLimit, err := core.IntrinsicGas(data, nil, nil, false, true, true, false)
229229
if err != nil {
230230
return nil, fmt.Errorf("failed to get intrinsicGas: %w", err)
231231
}
@@ -242,7 +242,7 @@ func getRandomSignedTransaction(ctx context.Context, ethClient *ethclient.Client
242242
Address: randomAddress,
243243
StorageKeys: []common.Hash{common.HexToHash("0x1234")},
244244
}}
245-
gasLimit, err := core.IntrinsicGas(data, accessList, false, true, true, false)
245+
gasLimit, err := core.IntrinsicGas(data, accessList, nil, false, true, true, false)
246246
if err != nil {
247247
return nil, fmt.Errorf("failed to get intrinsicGas: %w", err)
248248
}
@@ -257,7 +257,7 @@ func getRandomSignedTransaction(ctx context.Context, ethClient *ethclient.Client
257257
Data: data,
258258
}
259259
case types.DynamicFeeTxType:
260-
gasLimit, err := core.IntrinsicGas(data, nil, false, true, true, false)
260+
gasLimit, err := core.IntrinsicGas(data, nil, nil, false, true, true, false)
261261
if err != nil {
262262
return nil, fmt.Errorf("failed to get intrinsicGas: %w", err)
263263
}
@@ -275,6 +275,7 @@ func getRandomSignedTransaction(ctx context.Context, ethClient *ethclient.Client
275275
Value: amount,
276276
Data: data,
277277
}
278+
// TODO: SetCodeTx
278279
default:
279280
return nil, fmt.Errorf("unsupported tx type: %d", txType)
280281
}

op-chain-ops/script/forking/state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ func (fst *ForkableState) GetCode(address common.Address) []byte {
278278
return fst.stateFor(address).GetCode(address)
279279
}
280280

281-
func (fst *ForkableState) SetCode(address common.Address, bytes []byte) {
282-
fst.stateFor(address).SetCode(address, bytes)
281+
func (fst *ForkableState) SetCode(address common.Address, bytes []byte) []byte {
282+
return fst.stateFor(address).SetCode(address, bytes)
283283
}
284284

285285
func (fst *ForkableState) GetCodeSize(address common.Address) int {

op-deployer/pkg/deployer/broadcaster/keyed.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func asTxCandidate(bcast script.Broadcast, blockGasLimit uint64) txmgr.TxCandida
230230
// is clamped to the block gas limit since Geth will reject transactions that exceed it before letting them
231231
// into the mempool.
232232
func padGasLimit(data []byte, gasUsed uint64, creation bool, blockGasLimit uint64) uint64 {
233-
intrinsicGas, err := core.IntrinsicGas(data, nil, creation, true, true, false)
233+
intrinsicGas, err := core.IntrinsicGas(data, nil, nil, creation, true, true, false)
234234
// This method never errors - we should look into it if it does.
235235
if err != nil {
236236
panic(err)

op-e2e/actions/helpers/l2_batcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ func (s *L2Batcher) ActL2BatchSubmitRaw(t Testing, payload []byte, txOpts ...fun
343343
opt(rawTx)
344344
}
345345

346-
gas, err := core.IntrinsicGas(rawTx.Data, nil, false, true, true, false)
346+
gas, err := core.IntrinsicGas(rawTx.Data, nil, nil, false, true, true, false)
347347
require.NoError(t, err, "need to compute intrinsic gas")
348348
rawTx.Gas = gas
349349
txData = rawTx

op-node/rollup/derive/span_batch_tx.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type spanBatchSetCodeTxData struct {
5252
GasFeeCap *uint256.Int // a.k.a. maxFeePerGas
5353
Data []byte
5454
AccessList types.AccessList
55-
AuthList types.AuthorizationList
55+
AuthList []types.SetCodeAuthorization
5656
}
5757

5858
func (txData *spanBatchSetCodeTxData) txType() byte { return types.SetCodeTxType }
@@ -195,7 +195,7 @@ func (tx *spanBatchTx) convertToFullTx(nonce, gas uint64, to *common.Address, ch
195195
GasTipCap: batchTxInner.GasTipCap,
196196
GasFeeCap: batchTxInner.GasFeeCap,
197197
Gas: gas,
198-
To: to,
198+
To: *to,
199199
Value: batchTxInner.Value,
200200
Data: batchTxInner.Data,
201201
AccessList: batchTxInner.AccessList,
@@ -242,7 +242,7 @@ func newSpanBatchTx(tx *types.Transaction) (*spanBatchTx, error) {
242242
Value: uint256.MustFromBig(tx.Value()),
243243
Data: tx.Data(),
244244
AccessList: tx.AccessList(),
245-
AuthList: tx.AuthList(),
245+
AuthList: tx.SetCodeAuthorizations(),
246246
}
247247
default:
248248
return nil, fmt.Errorf("invalid tx type: %d", tx.Type())

0 commit comments

Comments
 (0)