diff --git a/common/version/version.go b/common/version/version.go index db847f7e86..fa3f8f67dc 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -5,7 +5,7 @@ import ( "runtime/debug" ) -var tag = "v4.4.97" +var tag = "v4.4.98" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/rollup/go.mod b/rollup/go.mod index 1f5960ed29..71741a3aa1 100644 --- a/rollup/go.mod +++ b/rollup/go.mod @@ -13,7 +13,7 @@ require ( github.com/holiman/uint256 v1.3.2 github.com/mitchellh/mapstructure v1.5.0 github.com/prometheus/client_golang v1.16.0 - github.com/scroll-tech/da-codec v0.1.3-0.20250310095435-012aaee6b435 + github.com/scroll-tech/da-codec v0.1.3-0.20250313030021-a8341d04bc4e github.com/scroll-tech/go-ethereum v1.10.14-0.20250305151038-478940e79601 github.com/smartystreets/goconvey v1.8.0 github.com/spf13/viper v1.19.0 diff --git a/rollup/go.sum b/rollup/go.sum index 49fe7e6a1d..5ea8461cbd 100644 --- a/rollup/go.sum +++ b/rollup/go.sum @@ -249,8 +249,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/scroll-tech/da-codec v0.1.3-0.20250310095435-012aaee6b435 h1:X9fkvjrYBY79lGgKEPpUhuiJ4vWpWwzOVw4H8CU8L54= -github.com/scroll-tech/da-codec v0.1.3-0.20250310095435-012aaee6b435/go.mod h1:yhTS9OVC0xQGhg7DN5iV5KZJvnSIlFWAxDdp+6jxQtY= +github.com/scroll-tech/da-codec v0.1.3-0.20250313030021-a8341d04bc4e h1:0IkSVltsMrKCprOOfQyJsLeqhPEuA0sTp41pZBpDeDk= +github.com/scroll-tech/da-codec v0.1.3-0.20250313030021-a8341d04bc4e/go.mod h1:yhTS9OVC0xQGhg7DN5iV5KZJvnSIlFWAxDdp+6jxQtY= github.com/scroll-tech/go-ethereum v1.10.14-0.20250305151038-478940e79601 h1:NEsjCG6uSvLRBlsP3+x6PL1kM+Ojs3g8UGotIPgJSz8= github.com/scroll-tech/go-ethereum v1.10.14-0.20250305151038-478940e79601/go.mod h1:OblWe1+QrZwdpwO0j/LY3BSGuKT3YPUFBDQQgvvfStQ= github.com/scroll-tech/zktrie v0.8.4 h1:UagmnZ4Z3ITCk+aUq9NQZJNAwnWl4gSxsLb2Nl7IgRE= diff --git a/rollup/internal/controller/watcher/l2_watcher.go b/rollup/internal/controller/watcher/l2_watcher.go index 259ea55dba..7c75a31981 100644 --- a/rollup/internal/controller/watcher/l2_watcher.go +++ b/rollup/internal/controller/watcher/l2_watcher.go @@ -8,8 +8,6 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/scroll-tech/da-codec/encoding" "github.com/scroll-tech/go-ethereum/common" - "github.com/scroll-tech/go-ethereum/common/hexutil" - gethTypes "github.com/scroll-tech/go-ethereum/core/types" "github.com/scroll-tech/go-ethereum/ethclient" "github.com/scroll-tech/go-ethereum/event" "github.com/scroll-tech/go-ethereum/log" @@ -86,43 +84,6 @@ func (w *L2WatcherClient) TryFetchRunningMissingBlocks(blockHeight uint64) { } } -func txsToTxsData(txs gethTypes.Transactions) []*gethTypes.TransactionData { - txsData := make([]*gethTypes.TransactionData, len(txs)) - for i, tx := range txs { - v, r, s := tx.RawSignatureValues() - - nonce := tx.Nonce() - - // We need QueueIndex in `NewBatchHeader`. However, `TransactionData` - // does not have this field. Since `L1MessageTx` do not have a nonce, - // we reuse this field for storing the queue index. - if msg := tx.AsL1MessageTx(); msg != nil { - nonce = msg.QueueIndex - } - - txsData[i] = &gethTypes.TransactionData{ - Type: tx.Type(), - TxHash: tx.Hash().String(), - Nonce: nonce, - ChainId: (*hexutil.Big)(tx.ChainId()), - Gas: tx.Gas(), - GasPrice: (*hexutil.Big)(tx.GasPrice()), - GasTipCap: (*hexutil.Big)(tx.GasTipCap()), - GasFeeCap: (*hexutil.Big)(tx.GasFeeCap()), - To: tx.To(), - Value: (*hexutil.Big)(tx.Value()), - Data: hexutil.Encode(tx.Data()), - IsCreate: tx.To() == nil, - AccessList: tx.AccessList(), - AuthorizationList: tx.SetCodeAuthorizations(), - V: (*hexutil.Big)(v), - R: (*hexutil.Big)(r), - S: (*hexutil.Big)(s), - } - } - return txsData -} - func (w *L2WatcherClient) getAndStoreBlocks(ctx context.Context, from, to uint64) error { var blocks []*encoding.Block for number := from; number <= to; number++ { @@ -150,7 +111,7 @@ func (w *L2WatcherClient) getAndStoreBlocks(ctx context.Context, from, to uint64 } blocks = append(blocks, &encoding.Block{ Header: block.Header(), - Transactions: txsToTxsData(block.Transactions()), + Transactions: encoding.TxsToTxsData(block.Transactions()), WithdrawRoot: common.BytesToHash(withdrawRoot), RowConsumption: block.RowConsumption, })