Skip to content
Open
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
2 changes: 1 addition & 1 deletion arbos/programs/programs.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func (p Programs) CallProgram(
moduleHash: moduleHash,
msgSender: scope.Contract.Caller(),
msgValue: scope.Contract.Value().Bytes32(),
txGasPrice: common.BigToHash(evm.TxContext.GasPrice),
txGasPrice: common.BigToHash(evm.TxContext.GasPrice.ToBig()),
txOrigin: evm.TxContext.Origin,
reentrant: arbmath.BoolToUint32(reentrant),
cached: program.cached,
Expand Down
6 changes: 3 additions & 3 deletions arbos/tx_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -868,16 +868,16 @@ func (p *TxProcessor) GetPaidGasPrice() *big.Int {
version := p.state.ArbOSVersion()
if version != params.ArbosVersion_9 {
// p.evm.Context.BaseFee is already lowered to 0 when vm runs with NoBaseFee flag and 0 gas price
gasPrice = p.evm.Context.BaseFee
return p.evm.Context.BaseFee
}
return gasPrice
return gasPrice.ToBig()
}

func (p *TxProcessor) GasPriceOp(evm *vm.EVM) *big.Int {
if p.state.ArbOSVersion() >= params.ArbosVersion_3 {
return p.GetPaidGasPrice()
}
return evm.GasPrice
return evm.GasPrice.ToBig()
}

func (p *TxProcessor) FillReceiptInfo(receipt *types.Receipt) {
Expand Down
2 changes: 2 additions & 0 deletions changelog/ganeshvanahalli-nit-4484.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Added
- Update geth pin to include commits from upstream geth's v1.17.0
6 changes: 3 additions & 3 deletions cmd/nitro/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ func OpenInitializeExecutionDB(ctx context.Context, stack *node.Node, config *co
return executionDB, nil, l2BlockChain, err
}

err = recreateMissingStates(config, executionDB, l2BlockChain, cacheConfig)
err = recreateMissingStates(ctx, config, executionDB, l2BlockChain, cacheConfig)
if err != nil {
return executionDB, nil, l2BlockChain, fmt.Errorf("failed to recreate missing states: %w", err)
}
Expand All @@ -666,9 +666,9 @@ func OpenInitializeExecutionDB(ctx context.Context, stack *node.Node, config *co
return executionDB, initDataReader, l2BlockChain, err
}

func recreateMissingStates(config *config.NodeConfig, executionDB ethdb.Database, l2BlockChain *core.BlockChain, cacheConfig *core.BlockChainConfig) error {
func recreateMissingStates(ctx context.Context, config *config.NodeConfig, executionDB ethdb.Database, l2BlockChain *core.BlockChain, cacheConfig *core.BlockChainConfig) error {
if config.Init.RecreateMissingStateFrom > 0 {
err := staterecovery.RecreateMissingStates(executionDB, l2BlockChain, cacheConfig, config.Init.RecreateMissingStateFrom)
err := staterecovery.RecreateMissingStates(ctx, executionDB, l2BlockChain, cacheConfig, config.Init.RecreateMissingStateFrom)
if err != nil {
return fmt.Errorf("failed to recreate missing states: %w", err)
}
Expand Down
5 changes: 3 additions & 2 deletions cmd/staterecovery/staterecovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package staterecovery

import (
"context"
"fmt"
"time"

Expand All @@ -16,7 +17,7 @@ import (
"github.com/ethereum/go-ethereum/triedb/hashdb"
)

func RecreateMissingStates(executionDB ethdb.Database, bc *core.BlockChain, cacheConfig *core.BlockChainConfig, startBlock uint64) error {
func RecreateMissingStates(ctx context.Context, executionDB ethdb.Database, bc *core.BlockChain, cacheConfig *core.BlockChainConfig, startBlock uint64) error {
start := time.Now()
currentHeader := bc.CurrentBlock()
if currentHeader == nil {
Expand Down Expand Up @@ -68,7 +69,7 @@ func RecreateMissingStates(executionDB ethdb.Database, bc *core.BlockChain, cach
}
currentState, err := state.New(currentBlock.Root(), database)
if err != nil {
_, err := bc.Processor().Process(currentBlock, previousState, vm.Config{})
_, err := bc.Processor().Process(ctx, currentBlock, previousState, vm.Config{})
if err != nil {
return fmt.Errorf("processing block %d failed: %w", current, err)
}
Expand Down
4 changes: 4 additions & 0 deletions execution/gethexec/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ type CachingConfig struct {
DisableStylusCacheMetricsCollection bool `koanf:"disable-stylus-cache-metrics-collection"`
StateScheme string `koanf:"state-scheme"`
StateHistory uint64 `koanf:"state-history"`
TrienodeHistory int64 `koanf:"trienode-history"`
EnablePreimages bool `koanf:"enable-preimages"`
PathdbMaxDiffLayers int `koanf:"pathdb-max-diff-layers"`
StateSizeTracking bool `koanf:"state-size-tracking"`
Expand Down Expand Up @@ -80,6 +81,7 @@ func CachingConfigAddOptions(prefix string, f *pflag.FlagSet) {
f.Bool(prefix+".disable-stylus-cache-metrics-collection", DefaultCachingConfig.DisableStylusCacheMetricsCollection, "disable metrics collection for the stylus cache")
f.String(prefix+".state-scheme", DefaultCachingConfig.StateScheme, "scheme to use for state trie storage (hash, path)")
f.Uint64(prefix+".state-history", DefaultCachingConfig.StateHistory, "number of recent blocks to retain state history for (path state-scheme only)")
f.Int64(prefix+".trienode-history", DefaultCachingConfig.TrienodeHistory, "number of recent blocks to retain trienode history for (path state-scheme only). 0: full chain, negative: disable")
f.Bool(prefix+".enable-preimages", DefaultCachingConfig.EnablePreimages, "enable recording of preimages")
f.Int(prefix+".pathdb-max-diff-layers", DefaultCachingConfig.PathdbMaxDiffLayers, "maximum number of diff layers to keep in pathdb (path state-scheme only)")
f.Bool(prefix+".state-size-tracking", DefaultCachingConfig.StateSizeTracking, "enable tracking of state size over time")
Expand Down Expand Up @@ -111,6 +113,7 @@ var DefaultCachingConfig = CachingConfig{
StylusLRUCacheCapacity: 256,
StateScheme: rawdb.HashScheme,
StateHistory: UninitializedStateHistory,
TrienodeHistory: -1,
EnablePreimages: false,
PathdbMaxDiffLayers: 128,
StateSizeTracking: false,
Expand Down Expand Up @@ -145,6 +148,7 @@ func DefaultCacheConfigTrieNoFlushFor(cachingConfig *CachingConfig, trieNoAsyncF
MaxAmountOfGasToSkipStateSaving: cachingConfig.MaxAmountOfGasToSkipStateSaving,
StateScheme: cachingConfig.StateScheme,
StateHistory: cachingConfig.StateHistory,
TrienodeHistory: cachingConfig.TrienodeHistory,
MaxDiffLayers: cachingConfig.PathdbMaxDiffLayers,
TrieNoAsyncFlush: trieNoAsyncFlush,
StateSizeTracking: cachingConfig.StateSizeTracking,
Expand Down
2 changes: 1 addition & 1 deletion execution/gethexec/executionengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ func (s *ExecutionEngine) createBlockFromNextMessage(msg *arbostypes.MessageWith
return nil, nil, nil, errors.New("can't find block for current header")
}

err := s.bc.RecoverState(currentBlock)
err := s.bc.RecoverState(s.GetContext(), currentBlock)
if err != nil {
return nil, nil, nil, fmt.Errorf("failed to recover block %v state: %w", currentBlock.Number(), err)
}
Expand Down
2 changes: 1 addition & 1 deletion go-ethereum
Submodule go-ethereum updated 401 files
36 changes: 18 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/gobwas/ws-examples v0.0.0-20190625122829-a9e8908d9484
github.com/golang-jwt/jwt/v4 v4.5.2
github.com/google/btree v1.1.2
github.com/google/go-cmp v0.6.0
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/holiman/uint256 v1.3.2
Expand All @@ -43,12 +43,12 @@ require (
github.com/redis/go-redis/v9 v9.6.3
github.com/rivo/tview v0.0.0-20240307173318-e804876934a1
github.com/spf13/pflag v1.0.6
github.com/stretchr/testify v1.10.0
github.com/stretchr/testify v1.11.1
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
github.com/wealdtech/go-merkletree v1.0.0
go.uber.org/automaxprocs v1.5.2
golang.org/x/sync v0.18.0
golang.org/x/sys v0.38.0
golang.org/x/sys v0.39.0
golang.org/x/term v0.37.0
golang.org/x/tools v0.38.0
google.golang.org/api v0.187.0
Expand All @@ -59,7 +59,7 @@ require (
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/auth v0.6.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
cloud.google.com/go/iam v1.1.8 // indirect
github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 // indirect
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
Expand All @@ -68,17 +68,18 @@ require (
github.com/emicklei/dot v1.6.2 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/ferranbt/fastssz v0.1.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.5 // indirect
github.com/grafana/pyroscope-go v1.2.7 // indirect
github.com/grafana/pyroscope-go/godeltaprof v0.1.9 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/pion/dtls/v2 v2.2.7 // indirect
Expand All @@ -87,20 +88,21 @@ require (
github.com/pion/transport/v2 v2.2.1 // indirect
github.com/pion/transport/v3 v3.0.1 // indirect
github.com/stretchr/objx v0.5.2 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.opentelemetry.io/otel v1.39.0 // indirect
go.opentelemetry.io/otel/metric v1.39.0 // indirect
go.opentelemetry.io/otel/trace v1.39.0 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/time v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20251222181119-0a764e51fe1b // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b // indirect
google.golang.org/grpc v1.77.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down Expand Up @@ -133,7 +135,6 @@ require (
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/gnark-crypto v0.18.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
Expand Down Expand Up @@ -163,7 +164,7 @@ require (
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5 // indirect
github.com/juju/loggo v0.0.0-20180524022052-584905176618 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
Expand All @@ -174,7 +175,6 @@ require (
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/pointerstructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.15.0 // indirect
Expand All @@ -183,7 +183,7 @@ require (
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rhnvrm/simples3 v0.6.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
Expand All @@ -199,5 +199,5 @@ require (
go.opencensus.io v0.24.0 // indirect
golang.org/x/mod v0.29.0
golang.org/x/net v0.47.0 // indirect
golang.org/x/oauth2 v0.27.0
golang.org/x/oauth2 v0.32.0
)
Loading
Loading