From e579aa211b32bf07d53ec9c4b6658da54dc347d0 Mon Sep 17 00:00:00 2001 From: georgehao Date: Mon, 9 Mar 2026 19:47:52 +0800 Subject: [PATCH] fix commit tx missing StorageKeys --- common/version/version.go | 2 +- rollup/internal/controller/sender/estimategas.go | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common/version/version.go b/common/version/version.go index 8af04b2b3..170334002 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -5,7 +5,7 @@ import ( "runtime/debug" ) -var tag = "v4.7.12" +var tag = "v4.7.13" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/rollup/internal/controller/sender/estimategas.go b/rollup/internal/controller/sender/estimategas.go index d9c7ed802..fce9866b0 100644 --- a/rollup/internal/controller/sender/estimategas.go +++ b/rollup/internal/controller/sender/estimategas.go @@ -168,8 +168,15 @@ func finetuneAccessList(accessList *types.AccessList, gasLimitWithAccessList uin // Each storage key saves 100 gas units. gasLimitWithAccessList += uint64(100 * len(entry.StorageKeys)) } else { - // Otherwise, keep the entry in the new access list. - newAccessList = append(newAccessList, entry) + // Ensure StorageKeys is never nil to avoid "missing required field 'storageKeys'" error during JSON serialization. + storageKeys := entry.StorageKeys + if storageKeys == nil { + storageKeys = []common.Hash{} + } + newAccessList = append(newAccessList, types.AccessTuple{ + Address: entry.Address, + StorageKeys: storageKeys, + }) } } return &newAccessList, gasLimitWithAccessList