Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion common/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
20 changes: 15 additions & 5 deletions rollup/internal/controller/sender/estimategas.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package sender

import (
"errors"
"fmt"
"math/big"

Expand Down Expand Up @@ -134,11 +133,15 @@ func (s *Sender) estimateGasLimit(to *common.Address, data []byte, sidecar *type
accessList, gasLimitWithAccessList, errStr, rpcErr := s.gethClient.CreateAccessList(s.ctx, msg)
if rpcErr != nil {
log.Error("CreateAccessList RPC error", "error", rpcErr)
return gasLimitWithoutAccessList, nil, rpcErr
// We ignore errors from eth_createAccessList and proceed
// with sending the transaction without an access list.
return gasLimitWithoutAccessList, nil, nil
}
if errStr != "" {
// We ignore errors from eth_createAccessList and proceed
// with sending the transaction without an access list.
log.Error("CreateAccessList reported error", "error", errStr)
return gasLimitWithoutAccessList, nil, errors.New(errStr)
return gasLimitWithoutAccessList, nil, nil
}
Comment thread
georgehao marked this conversation as resolved.

// Fine-tune accessList because 'to' address is automatically included in the access list by the Ethereum protocol: https://github.com/ethereum/go-ethereum/blob/v1.13.10/core/state/statedb.go#L1322
Expand Down Expand Up @@ -168,8 +171,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
Expand Down