Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 1.13 #279

Merged
merged 115 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
8d1db16
eth/filters, core/rawdb: remove unused param, refactor filtering-loop…
holiman Aug 10, 2023
86d7f5a
deps: update supranational/blst to 0.3.11 (#27890)
dependabot[bot] Aug 10, 2023
5e89ff4
graphql: validate block params (#27876)
s1na Aug 10, 2023
503f1f7
all: activate pbss as experimental feature (#26274)
rjl493456442 Aug 10, 2023
e2507a1
params: switch release family to 1.13 to prep for PBSS
karalabe Aug 10, 2023
6ddb92c
core/txpool/blobpool: fix metrics name for prometheus export (#27901)
imulmat4 Aug 11, 2023
35f7f3d
ethdb/leveldb: support more than 7 levels in metrics (#27904)
jsvisa Aug 11, 2023
8f8ef2b
rpc: attempt to fix ping/pong logic race (#27733)
fjl Aug 11, 2023
80b76a9
core/types: remove duplication in eip2930 signer (#27860)
GDdark Aug 11, 2023
0ce331f
trie/triedb/pathdb: make shutdown journal log friendlier (#27905)
karalabe Aug 11, 2023
be65b47
all: update golang/x/ext and fix slice sorting fallout (#27909)
karalabe Aug 11, 2023
e91b21c
go.mod, build: upgrade c-kzg-4844 (#27907)
fjl Aug 11, 2023
6886006
internal/build: apply -ubuntu to env (#27910)
fjl Aug 12, 2023
2a6beb6
core/types: support for optional blob sidecar in BlobTx (#27841)
fjl Aug 14, 2023
6885521
cmd/utils: restore support for txlookuplimit flag (#27917)
jsvisa Aug 14, 2023
509cd42
go.mod: upgrade goja (#27899)
ucwong Aug 14, 2023
f1801a9
internal/ethapi: implement eth_getBlockReceipts (#27702)
jsvisa Aug 15, 2023
05a8b88
crypto/bls12381: fix typo in comment (#27930)
lei335 Aug 15, 2023
ab28680
trie: add tests for "short" nodes in StackTrie (#27932)
chfast Aug 15, 2023
e0b1198
eth/tracers/js: use t.toBig on ctx.GasPrice for js tracing (#27903)
nettijoe96 Aug 15, 2023
a16d757
build: remove ubuntu kinetic (deprecated) (#27933)
holiman Aug 16, 2023
386cba1
node: increase batch limits for auth rpc API (#27924)
jsvisa Aug 16, 2023
a3e3541
core/types: fix unmarshalling of BlobTx values (#27939)
lightclient Aug 16, 2023
32fde3f
core/forkid: correctly compute forkid when timestamp fork is activate…
lightclient Aug 16, 2023
1aa5520
core/txpool/legacypool: protect cache with mutex (#27898)
holiman Aug 17, 2023
649deb6
eth/downloader: fix rare crash when parent header missing in db (#27945)
jsvisa Aug 17, 2023
950ccdd
internal/ethapi: optimize & clean up EstimateGas (#27710)
roberto-bayardo Aug 18, 2023
7dea9c1
internal/ethapi: eth API changes needed for 4844 (#27928)
MariusVanDerWijden Aug 18, 2023
5976e58
trie: reduce allocs in recHash (#27770)
MariusVanDerWijden Aug 18, 2023
b3024e8
eth: ignore genesis block on importChain (#27956)
MariusVanDerWijden Aug 21, 2023
f56ee7d
eth/catalyst: set finalized block hash properly in dev mode (#27886)
jwasinger Aug 21, 2023
9f4a528
internal/ethapi: add testcases for blobTx (#27818)
jsvisa Aug 22, 2023
7c0d90c
core: ensure txindex will be triggered at least once (#27847)
jsvisa Aug 22, 2023
bbee0e7
miner: fix reply -> replay typo (#27961)
shuoli84 Aug 22, 2023
55c5f59
travis, build: update Go to 1.21.0 (#27958)
holiman Aug 22, 2023
0b4b299
go.mod: update docker (#27970)
MariusVanDerWijden Aug 22, 2023
b8d38e7
core, params, beacon/engine: implement EIP 4788 BeaconRoot (#27849)
holiman Aug 22, 2023
8d24929
cmd/evm: add back stateroot to jsonl-output (#27968)
holiman Aug 22, 2023
4c7053b
core: add BeaconRoot to header in GenerateChain (#27974)
fjl Aug 22, 2023
16946d2
rpc: use go-winio for named pipes (#27972)
holiman Aug 23, 2023
c31f9cf
graphql: fix nil deref on a timer (#27978)
jsvisa Aug 23, 2023
ab3762b
go.mod: update pebble to crl-release-23.1 (#27967)
karalabe Aug 23, 2023
0c6bbeb
core, eth, trie: expose more detailed dirty ram tracking for diff lay…
karalabe Aug 23, 2023
bce5c46
eth/catalyst: disable full payload when not in dev mode (#27921)
rjl493456442 Aug 23, 2023
00fead9
cmd/utils: fix a startup issue on deleted chaindata but dangling anci…
karalabe Aug 23, 2023
4af98d4
travis: increase travis wait time (#27975)
holiman Aug 23, 2023
76d4ac1
account/abi: convert if-else-if chain to tagged switch (#27869)
islishude Aug 23, 2023
52219ce
travis: get rid of old useless GO111MODULE directives (#27991)
karalabe Aug 23, 2023
5c7136a
rlp: remove allocation of bytes.Reader in DecodeBytes (#27987)
fjl Aug 23, 2023
f0f8703
core/rawdb, ethdb/pebble: avoid fsync db in tests (#27836)
holiman Aug 23, 2023
e3f3e01
les: use new atomic types (#27856)
ucwong Aug 23, 2023
4abc412
crypto/bn256: eliminate dead store (#27944)
cuiweixie Aug 23, 2023
2f4dbb4
core/rawdb: allocate database keys with explicit size to avoid slice …
MariusVanDerWijden Aug 23, 2023
eb6cbe3
core/state: remove public method ForEachStorage (#27986)
holiman Aug 23, 2023
d1f6735
core/rawdb: fix 32bit build (#27995)
fjl Aug 23, 2023
feb8f41
miner: add to build block with EIP-4844 blobs (#27875)
lightclient Aug 23, 2023
60ec41c
miner: refactor getSealingBlock method (#27993)
MariusVanDerWijden Aug 23, 2023
9b46986
all: use rlp.DecodeBytes instead of rlp.Decode where possible (#27994)
fjl Aug 24, 2023
45b198d
eth/catalyst: disable heartbeat for simulated beacon node (#27979)
jsvisa Aug 24, 2023
1a21350
eth/catalyst: use block as finalization (#28000)
rjl493456442 Aug 24, 2023
0ba2d3c
core/vm/runtime: Add Random field to config (#28001)
guidovranken Aug 25, 2023
56d2366
core/state/snapshot: replace diffToDisk ideal batch size with 64MB (#…
aaronbuchwald Aug 25, 2023
6dc9cdf
core: support null balance in genesis (#28005)
fjl Aug 25, 2023
5e0eb62
eth/protocols/eth: stop advertising eth/66 for pathdb nodes (#28006)
karalabe Aug 25, 2023
6b98d18
cmd, core, params: add support for the Holesky testnet (#28007)
karalabe Aug 25, 2023
9bbb9df
core/types: transaction and receipt encoding/decoding optimizations (…
fjl Aug 25, 2023
cde462c
eth/catalyst: reset to current header if chain is rewound (in dev mod…
jsvisa Aug 25, 2023
6aa88cc
beacon/engine, eth/catalyst, miner: EIP-4788 CL/EL protocol updates (…
holiman Aug 26, 2023
5ca7fb8
account/abi: handle solidity panic revert (#27868)
islishude Aug 26, 2023
3ff6b3c
core/state: implement fast storage deletion (#27955)
rjl493456442 Aug 26, 2023
3a662d4
eth: remove check for tdd reached on pos api block tags (#27799)
lightclient Aug 26, 2023
d4e345c
core/state: fix missing import (#28010)
holiman Aug 26, 2023
f174ddb
build, tests: add execution-spec-tests (#26985)
MariusVanDerWijden Aug 26, 2023
fe24d22
miner/stress/clique: fix typo (#28016)
Cr4shOv3rrid3 Aug 28, 2023
b8adb4c
tests: use 'sender' in state tests if present (#28023)
holiman Aug 29, 2023
41ee96f
core/txpool/blobpool: fix rlp decoding flaw during offload (#28027)
lightclient Aug 30, 2023
5b15949
go.mod: regenerate all indirect dependencies to clean up the junk (#2…
karalabe Aug 31, 2023
53f3c2a
metrics, cmd/geth: informational metrics (prometheus, influxdb, opent…
jorgeacortes Aug 31, 2023
0acc0a1
core/state: simplify storage trie update and commit (#28030)
rjl493456442 Aug 31, 2023
2885708
eth/catalyst: set random value in dev mode (#27940)
MariusVanDerWijden Aug 31, 2023
f260a9e
beacon/engine: add `shouldOverrideBuilder` to payload envelope (#28029)
lightclient Sep 4, 2023
eff7c3b
core/forkid: skip genesis forks by time (#28034)
lightclient Sep 4, 2023
25733a4
params: update 4844 parameters (#28026)
lightclient Sep 5, 2023
2f77299
go.mod: goupnp 1.3.0 (#28053)
ucwong Sep 6, 2023
2e02c1f
core/rawdb: don't warn for missing "unclean shutdown markers" (#28014)
jsvisa Sep 6, 2023
c60f7dd
deps: update minisign (#28066)
holiman Sep 7, 2023
a8d7201
log: avoid stack lookups when not needed/used (#28069)
holiman Sep 7, 2023
a7842c9
core, trie: cleanup trie database (#28062)
rjl493456442 Sep 7, 2023
83886e4
go.mod: pull in a fix from pebble crl-release-23.1 (#28081)
karalabe Sep 8, 2023
5cf53f5
ethclient: use 'input', not 'data' as field for transaction input (#2…
holiman Sep 8, 2023
1efd12f
core: fix calculation of blob gasprice in tx receipt (#28082)
lightclient Sep 11, 2023
12ef276
consensus/misc: fix min gas limit error message (#28085)
0xmuralik Sep 11, 2023
7371b38
params: release Geth v1.13.0
karalabe Sep 12, 2023
cd71625
Merge upstream PR #26274
tsahee Jan 12, 2024
4c792eb
fix compile errors from upstream #27891
tsahee Jan 12, 2024
1ab4b7a
Merge commit 'e2507a17e8df5bb84b4b1195cf6a2d58e3ba109c'
tsahee Jan 13, 2024
8303a8b
Merge upstream PR #27841
tsahee Jan 13, 2024
055be78
Merge upstream PR #27702
tsahee Jan 13, 2024
b5a526d
Merge upstream PR #27710
tsahee Jan 13, 2024
9e4c2ed
merge upstream PR #27928
tsahee Jan 13, 2024
33f1e1c
Merge upstream commit #27886
tsahee Jan 13, 2024
3315708
fix importing blocks before genesis
tsahee Jan 13, 2024
12679bb
Merge upstream PR #27849
tsahee Jan 13, 2024
9e4f4f3
Merge upstream PR #27971
tsahee Jan 16, 2024
c399c12
Merge upstream PR #27875
tsahee Jan 17, 2024
06c698a
Merge upstream PR #27976
tsahee Jan 17, 2024
5ae24c9
Merge upstream PR #27872
tsahee Jan 17, 2024
7414dcd
IsCancun: add arbosVersion parameter
tsahee Jan 18, 2024
3945fec
Merge upstream PR 28030
tsahee Jan 18, 2024
1ed9f59
Merge upstream PR 28062
tsahee Jan 18, 2024
22dbe2b
Merge tag 'v1.13.0' into merge-1.13
tsahee Jan 18, 2024
1ef6ec7
core: make ForEachStorage available for external tests
tsahee Jan 18, 2024
c4b3aa6
fix merging upstream 27841
tsahee Jan 18, 2024
6493a32
remove duplicate line
tsahee Jan 24, 2024
5a266a5
Merge remote-tracking branch 'origin/master' into HEAD
tsahee Jan 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 15 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- stage: lint
os: linux
dist: bionic
go: 1.20.x
go: 1.21.x
env:
- lint
git:
Expand All @@ -28,7 +28,7 @@ jobs:
os: linux
arch: amd64
dist: bionic
go: 1.20.x
go: 1.21.x
env:
- docker
services:
Expand All @@ -45,7 +45,7 @@ jobs:
os: linux
arch: arm64
dist: bionic
go: 1.20.x
go: 1.21.x
env:
- docker
services:
Expand All @@ -63,10 +63,9 @@ jobs:
os: linux
dist: bionic
sudo: required
go: 1.20.x
go: 1.21.x
env:
- azure-linux
- GO111MODULE=on
git:
submodules: false # avoid cloning ethereum/tests
addons:
Expand Down Expand Up @@ -97,10 +96,9 @@ jobs:
- stage: build
if: type = push
os: osx
go: 1.20.x
go: 1.21.x
env:
- azure-osx
- GO111MODULE=on
git:
submodules: false # avoid cloning ethereum/tests
script:
Expand All @@ -112,41 +110,34 @@ jobs:
os: linux
arch: amd64
dist: bionic
go: 1.20.x
env:
- GO111MODULE=on
go: 1.21.x
script:
- go run build/ci.go test $TEST_PACKAGES
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES

- stage: build
if: type = pull_request
os: linux
arch: arm64
dist: bionic
go: 1.19.x
env:
- GO111MODULE=on
go: 1.20.x
script:
- go run build/ci.go test $TEST_PACKAGES
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES

- stage: build
os: linux
dist: bionic
go: 1.19.x
env:
- GO111MODULE=on
go: 1.20.x
script:
- go run build/ci.go test $TEST_PACKAGES
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES

# This builder does the Ubuntu PPA nightly uploads
- stage: build
if: type = cron || (type = push && tag ~= /^v[0-9]/)
os: linux
dist: bionic
go: 1.20.x
go: 1.21.x
env:
- ubuntu-ppa
- GO111MODULE=on
git:
submodules: false # avoid cloning ethereum/tests
addons:
Expand All @@ -167,10 +158,9 @@ jobs:
if: type = cron
os: linux
dist: bionic
go: 1.20.x
go: 1.21.x
env:
- azure-purge
- GO111MODULE=on
git:
submodules: false # avoid cloning ethereum/tests
script:
Expand All @@ -181,9 +171,7 @@ jobs:
if: type = cron
os: linux
dist: bionic
go: 1.20.x
env:
- GO111MODULE=on
go: 1.21.x
script:
- go run build/ci.go test -race $TEST_PACKAGES
- travis_wait 30 go run build/ci.go test -race $TEST_PACKAGES

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION=""
ARG BUILDNUM=""

# Build Geth in a stock Go builder container
FROM golang:1.20-alpine as builder
FROM golang:1.21-alpine as builder

RUN apk add --no-cache gcc musl-dev linux-headers git

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

GOBIN = ./build/bin
GO ?= latest
GORUN = env GO111MODULE=on go run
GORUN = go run

geth:
$(GORUN) build/ci.go install ./cmd/geth
Expand All @@ -23,7 +23,7 @@ lint: ## Run linters.
$(GORUN) build/ci.go lint

clean:
env GO111MODULE=on go clean -cache
go clean -cache
rm -fr build/_workspace/pkg/ $(GOBIN)/*

# The devtools target installs tools required for 'go generate'.
Expand Down
66 changes: 54 additions & 12 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"errors"
"fmt"
"io"
"math/big"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
Expand Down Expand Up @@ -246,24 +247,65 @@ func (abi *ABI) HasReceive() bool {
// revertSelector is a special function selector for revert reason unpacking.
var revertSelector = crypto.Keccak256([]byte("Error(string)"))[:4]

// panicSelector is a special function selector for panic reason unpacking.
var panicSelector = crypto.Keccak256([]byte("Panic(uint256)"))[:4]

// panicReasons map is for readable panic codes
// see this linkage for the deails
// https://docs.soliditylang.org/en/v0.8.21/control-structures.html#panic-via-assert-and-error-via-require
// the reason string list is copied from ether.js
// https://github.com/ethers-io/ethers.js/blob/fa3a883ff7c88611ce766f58bdd4b8ac90814470/src.ts/abi/interface.ts#L207-L218
var panicReasons = map[uint64]string{
0x00: "generic panic",
0x01: "assert(false)",
0x11: "arithmetic underflow or overflow",
0x12: "division or modulo by zero",
0x21: "enum overflow",
0x22: "invalid encoded storage byte array accessed",
0x31: "out-of-bounds array access; popping on an empty array",
0x32: "out-of-bounds access of an array or bytesN",
0x41: "out of memory",
0x51: "uninitialized function",
}

// UnpackRevert resolves the abi-encoded revert reason. According to the solidity
// spec https://solidity.readthedocs.io/en/latest/control-structures.html#revert,
// the provided revert reason is abi-encoded as if it were a call to a function
// `Error(string)`. So it's a special tool for it.
// the provided revert reason is abi-encoded as if it were a call to function
// `Error(string)` or `Panic(uint256)`. So it's a special tool for it.
func UnpackRevert(data []byte) (string, error) {
if len(data) < 4 {
return "", errors.New("invalid data for unpacking")
}
if !bytes.Equal(data[:4], revertSelector) {
switch {
case bytes.Equal(data[:4], revertSelector):
typ, err := NewType("string", "", nil)
if err != nil {
return "", err
}
unpacked, err := (Arguments{{Type: typ}}).Unpack(data[4:])
if err != nil {
return "", err
}
return unpacked[0].(string), nil
case bytes.Equal(data[:4], panicSelector):
typ, err := NewType("uint256", "", nil)
if err != nil {
return "", err
}
unpacked, err := (Arguments{{Type: typ}}).Unpack(data[4:])
if err != nil {
return "", err
}
pCode := unpacked[0].(*big.Int)
// uint64 safety check for future
// but the code is not bigger than MAX(uint64) now
if pCode.IsUint64() {
if reason, ok := panicReasons[pCode.Uint64()]; ok {
return reason, nil
}
}
return fmt.Sprintf("unknown panic code: %#x", pCode), nil
default:
return "", errors.New("invalid data for unpacking")
}
typ, err := NewType("string", "", nil)
if err != nil {
return "", err
}
unpacked, err := (Arguments{{Type: typ}}).Unpack(data[4:])
if err != nil {
return "", err
}
return unpacked[0].(string), nil
}
2 changes: 2 additions & 0 deletions accounts/abi/abi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,8 @@ func TestUnpackRevert(t *testing.T) {
{"", "", errors.New("invalid data for unpacking")},
{"08c379a1", "", errors.New("invalid data for unpacking")},
{"08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000d72657665727420726561736f6e00000000000000000000000000000000000000", "revert reason", nil},
{"4e487b710000000000000000000000000000000000000000000000000000000000000000", "generic panic", nil},
{"4e487b7100000000000000000000000000000000000000000000000000000000000000ff", "unknown panic code: 0xff", nil},
}
for index, c := range cases {
t.Run(fmt.Sprintf("case %d", index), func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ func (fb *filterBackend) GetReceipts(ctx context.Context, hash common.Hash) (typ
}

func (fb *filterBackend) GetLogs(ctx context.Context, hash common.Hash, number uint64) ([][]*types.Log, error) {
logs := rawdb.ReadLogs(fb.db, hash, number, fb.bc.Config())
logs := rawdb.ReadLogs(fb.db, hash, number)
return logs, nil
}

Expand Down
7 changes: 4 additions & 3 deletions accounts/abi/method.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,12 @@ func NewMethod(name string, rawName string, funType FunctionType, mutability str
state = state + " "
}
identity := fmt.Sprintf("function %v", rawName)
if funType == Fallback {
switch funType {
case Fallback:
identity = "fallback"
} else if funType == Receive {
case Receive:
identity = "receive"
} else if funType == Constructor {
case Constructor:
identity = "constructor"
}
str := fmt.Sprintf("%v(%v) %sreturns(%v)", identity, strings.Join(inputNames, ", "), state, strings.Join(outputNames, ", "))
Expand Down
7 changes: 4 additions & 3 deletions accounts/abi/method_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ func TestMethodString(t *testing.T) {

for _, test := range table {
var got string
if test.method == "fallback" {
switch test.method {
case "fallback":
got = abi.Fallback.String()
} else if test.method == "receive" {
case "receive":
got = abi.Receive.String()
} else {
default:
got = abi.Methods[test.method].String()
}
if got != test.expectation {
Expand Down
7 changes: 4 additions & 3 deletions accounts/abi/unpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,14 @@ func forEachUnpack(t Type, output []byte, start, size int) (interface{}, error)
// this value will become our slice or our array, depending on the type
var refSlice reflect.Value

if t.T == SliceTy {
switch t.T {
case SliceTy:
// declare our slice
refSlice = reflect.MakeSlice(t.GetType(), size, size)
} else if t.T == ArrayTy {
case ArrayTy:
// declare our array
refSlice = reflect.New(t.GetType()).Elem()
} else {
default:
return nil, errors.New("abi: invalid type in array/slice unpacking stage")
}

Expand Down
2 changes: 1 addition & 1 deletion arbitrum/apibackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ func (a *APIBackend) BloomStatus() (uint64, uint64) {
}

func (a *APIBackend) GetLogs(ctx context.Context, hash common.Hash, number uint64) ([][]*types.Log, error) {
return rawdb.ReadLogs(a.ChainDb(), hash, number, a.ChainConfig()), nil
return rawdb.ReadLogs(a.ChainDb(), hash, number), nil
}

func (a *APIBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession) {
Expand Down
13 changes: 10 additions & 3 deletions arbitrum/recordingdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/trie/triedb/hashdb"
flag "github.com/spf13/pflag"
)

Expand Down Expand Up @@ -181,9 +182,15 @@ type RecordingDatabase struct {
}

func NewRecordingDatabase(config *RecordingDatabaseConfig, ethdb ethdb.Database, blockchain *core.BlockChain) *RecordingDatabase {
hashConfig := *hashdb.Defaults
hashConfig.CleanCacheSize = config.TrieCleanCache
trieConfig := trie.Config{
Preimages: false,
HashDB: &hashConfig,
}
return &RecordingDatabase{
config: config,
db: state.NewDatabaseWithConfig(ethdb, &trie.Config{Cache: config.TrieCleanCache}),
db: state.NewDatabaseWithConfig(ethdb, &trieConfig),
bc: blockchain,
}
}
Expand Down Expand Up @@ -241,13 +248,13 @@ func (r *RecordingDatabase) addStateVerify(statedb *state.StateDB, expected comm
}
r.referenceRootLockHeld(result)

size, _ := r.db.TrieDB().Size()
_, size, _ := r.db.TrieDB().Size()
limit := common.StorageSize(r.config.TrieDirtyCache) * 1024 * 1024
recordingDbSize.Update(int64(size))
if size > limit {
log.Info("Recording DB: flushing to disk", "size", size, "limit", limit)
r.db.TrieDB().Cap(limit - ethdb.IdealBatchSize)
size, _ = r.db.TrieDB().Size()
_, size, _ = r.db.TrieDB().Size()
recordingDbSize.Update(int64(size))
}
return state.New(result, statedb.Database(), nil)
Expand Down
10 changes: 2 additions & 8 deletions arbitrum_types/txoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,8 @@ func (o *ConditionalOptions) Check(l1BlockNumber uint64, l2Timestamp uint64, sta
}
for address, rootHashOrSlots := range o.KnownAccounts {
if rootHashOrSlots.RootHash != nil {
trie, err := statedb.StorageTrie(address)
if err != nil {
return err
}
if trie == nil {
return NewRejectedError("Storage trie not found for address key in knownAccounts option")
}
if trie.Hash() != *rootHashOrSlots.RootHash {
storageRoot := statedb.GetStorageRoot(address)
if storageRoot != *rootHashOrSlots.RootHash {
return NewRejectedError("Storage root hash condition not met")
}
} else if len(rootHashOrSlots.SlotValue) > 0 {
Expand Down
1 change: 1 addition & 0 deletions beacon/engine/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ var (
InvalidPayloadAttributes = &EngineAPIError{code: -38003, msg: "Invalid payload attributes"}
TooLargeRequest = &EngineAPIError{code: -38004, msg: "Too large request"}
InvalidParams = &EngineAPIError{code: -32602, msg: "Invalid parameters"}
UnsupportedFork = &EngineAPIError{code: -38005, msg: "Unsupported fork"}

STATUS_INVALID = ForkChoiceResponse{PayloadStatus: PayloadStatusV1{Status: INVALID}, PayloadID: nil}
STATUS_SYNCING = ForkChoiceResponse{PayloadStatus: PayloadStatusV1{Status: SYNCING}, PayloadID: nil}
Expand Down
Loading
Loading