Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/chilly-grapes-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@eth-optimism/l2geth": patch
---

Removes the extra setting of the txmeta in the syncservice and instead sets the raw tx in the txmeta at the rpc layer
4 changes: 2 additions & 2 deletions l2geth/internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1752,8 +1752,8 @@ func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encod
if new(big.Int).Mod(tx.GasPrice(), big.NewInt(1000000)).Cmp(big.NewInt(0)) != 0 {
return common.Hash{}, errors.New("Gas price must be a multiple of 1,000,000 wei")
}
// L1Timestamp and L1BlockNumber will be set by the miner
txMeta := types.NewTransactionMeta(nil, 0, nil, types.SighashEIP155, types.QueueOriginSequencer, nil, nil, nil)
// L1Timestamp and L1BlockNumber will be set right before execution
txMeta := types.NewTransactionMeta(nil, 0, nil, types.SighashEIP155, types.QueueOriginSequencer, nil, nil, encodedTx)
tx.SetTransactionMeta(txMeta)
return SubmitTransaction(ctx, s.b, tx)
}
Expand Down
20 changes: 0 additions & 20 deletions l2geth/rollup/sync_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"

"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types"
Expand Down Expand Up @@ -743,24 +742,5 @@ func (s *SyncService) ApplyTransaction(tx *types.Transaction) error {
tx.SetL1Timestamp(ts)
tx.SetL1BlockNumber(bn)
}

// Set the raw transaction data in the meta
txRaw, err := rlp.EncodeToBytes(tx)
if err != nil {
return fmt.Errorf("invalid transaction: %w", err)
}
meta := tx.GetMeta()
newMeta := types.NewTransactionMeta(
meta.L1BlockNumber,
meta.L1Timestamp,
meta.L1MessageSender,
meta.SignatureHashType,
types.QueueOrigin(meta.QueueOrigin.Uint64()),
meta.Index,
meta.QueueIndex,
txRaw,
)
tx.SetTransactionMeta(newMeta)

return s.applyTransaction(tx)
}