From e658feceb46eddd6a53b45dbac422a8905129d00 Mon Sep 17 00:00:00 2001 From: Philippe Camacho Date: Mon, 8 Dec 2025 20:17:00 -0300 Subject: [PATCH 1/2] Remove the superfluous check about the batcher address as now the Batch Inbox contract verifies the sender is legitimate. --- op-node/rollup/derive/data_source.go | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/op-node/rollup/derive/data_source.go b/op-node/rollup/derive/data_source.go index 8bdf3073404..9d1d5c78de1 100644 --- a/op-node/rollup/derive/data_source.go +++ b/op-node/rollup/derive/data_source.go @@ -94,10 +94,10 @@ type DataSourceConfig struct { // isValidBatchTx returns true if: // 1. the transaction is not reverted // 2. the transaction type is any of Legacy, ACL, DynamicFee, Blob, or Deposit (for L3s). -// 3. the transaction has a To() address that matches the batch inbox address, and -// 4. the transaction has a valid signature from the batcher address -func isValidBatchTx(tx *types.Transaction, receipt *types.Receipt, l1Signer types.Signer, batchInboxAddr, batcherAddr common.Address, logger log.Logger) bool { +// 3. the transaction has a To() address that matches the batch inbox address +func isValidBatchTx(tx *types.Transaction, receipt *types.Receipt, _ types.Signer, batchInboxAddr, batcherAddr common.Address, logger log.Logger) bool { if receipt.Status != types.ReceiptStatusSuccessful { + logger.Warn("tx in inbox with invalid status", "hash", tx.Hash(), "status", receipt.Status) return false } @@ -110,15 +110,12 @@ func isValidBatchTx(tx *types.Transaction, receipt *types.Receipt, l1Signer type if to == nil || *to != batchInboxAddr { return false } - seqDataSubmitter, err := l1Signer.Sender(tx) // optimization: only derive sender if To is correct - if err != nil { - logger.Warn("tx in inbox with invalid signature", "hash", tx.Hash(), "err", err) - return false - } - // some random L1 user might have sent a transaction to our batch inbox, ignore them - if seqDataSubmitter != batcherAddr { - logger.Warn("tx in inbox with unauthorized submitter", "addr", seqDataSubmitter, "hash", tx.Hash(), "err", err) - return false - } + + // NOTE: contrary to a standard OP L1 batcher we can safely skip any verification related + // to the sender of the transaction as indeed the Batch Inbox contract takes care of + // ensuring the sender of the batch information is a legitimate batcher. + // Thus the parameters l1Signer and batchInboxAddress are not used. However they are kept + // for compatibility with upstream code. + return true } From a746305c7c17fcb9e12cc7b75274552ce6779031 Mon Sep 17 00:00:00 2001 From: Philippe Camacho Date: Mon, 8 Dec 2025 21:23:30 -0300 Subject: [PATCH 2/2] Improve comment. --- op-node/rollup/derive/data_source.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/op-node/rollup/derive/data_source.go b/op-node/rollup/derive/data_source.go index 9d1d5c78de1..c7f04154ece 100644 --- a/op-node/rollup/derive/data_source.go +++ b/op-node/rollup/derive/data_source.go @@ -111,11 +111,11 @@ func isValidBatchTx(tx *types.Transaction, receipt *types.Receipt, _ types.Signe return false } - // NOTE: contrary to a standard OP L1 batcher we can safely skip any verification related - // to the sender of the transaction as indeed the Batch Inbox contract takes care of + // NOTE: contrary to a standard OP batcher, we can safely skip any verification related + // to the sender of the transaction. Indeed the Batch Inbox contract takes care of // ensuring the sender of the batch information is a legitimate batcher. - // Thus the parameters l1Signer and batchInboxAddress are not used. However they are kept - // for compatibility with upstream code. + // Thus the parameters l1Signer is not used anymore. + // However, it is kept for compatibility with upstream code. return true }