Official Go implementation of the Ethereum protocol
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Marius van der Wijden
767a2928bc
core: reduce peak memory usage during reorg ( #30600 )
...
~~Opening this as a draft to have a discussion.~~ Pressed the wrong
button
I had [a previous PR
](https://github.com/ethereum/go-ethereum/pull/24616 )a long time ago
which reduced the peak memory used during reorgs by not accumulating all
transactions and logs.
This PR reduces the peak memory further by not storing the blocks in
memory.
However this means we need to pull the blocks back up from storage
multiple times during the reorg.
I collected the following numbers on peak memory usage:
// Master: BenchmarkReorg-8 10000 899591 ns/op 820154 B/op 1440
allocs/op 1549443072 bytes of heap used
// WithoutOldChain: BenchmarkReorg-8 10000 1147281 ns/op 943163 B/op
1564 allocs/op 1163870208 bytes of heap used
// WithoutNewChain: BenchmarkReorg-8 10000 1018922 ns/op 943580 B/op
1564 allocs/op 1171890176 bytes of heap used
Each block contains a transaction with ~50k bytes and we're doing a 10k
block reorg, so the chain should be ~500MB in size
---------
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
3 months ago
..
asm
core/vm, cmd/evm: implement eof validation ( #30418 )
3 months ago
bloombits
all: fix typos in comments ( #29873 )
9 months ago
forkid
all: clean up goerli flag and config ( #30289 )
6 months ago
rawdb
core, ethdb/pebble: run pebble in non-sync mode ( #30573 )
3 months ago
state
build: update to golangci-lint 1.61.0 ( #30587 )
3 months ago
stateless
beacon, core, eth, miner: integrate witnesses into production Geth ( #30069 )
5 months ago
tracing
core/tracing: add GetTransientState method to StateDB interface ( #30531 )
3 months ago
txpool
core, eth, ethstats: simplify chain head events ( #30601 )
3 months ago
types
build: update to golangci-lint 1.61.0 ( #30587 )
3 months ago
vm
build: update to golangci-lint 1.61.0 ( #30587 )
3 months ago
.gitignore
…
bench_test.go
all: remove forkchoicer and reorgNeeded ( #29179 )
6 months ago
block_validator.go
build: update to golangci-lint 1.61.0 ( #30587 )
3 months ago
block_validator_test.go
beacon, core, eth, miner: integrate witnesses into production Geth ( #30069 )
5 months ago
blockchain.go
core: reduce peak memory usage during reorg ( #30600 )
3 months ago
blockchain_insert.go
all: remove forkchoicer and reorgNeeded ( #29179 )
6 months ago
blockchain_reader.go
core, eth, ethstats: simplify chain head events ( #30601 )
3 months ago
blockchain_repair_test.go
core, ethdb/pebble: run pebble in non-sync mode ( #30573 )
3 months ago
blockchain_sethead_test.go
core, ethdb/pebble: run pebble in non-sync mode ( #30573 )
3 months ago
blockchain_snapshot_test.go
core, ethdb/pebble: run pebble in non-sync mode ( #30573 )
3 months ago
blockchain_test.go
core: reduce peak memory usage during reorg ( #30600 )
3 months ago
bloom_indexer.go
core: preallocate batch size in bloomIndexer ( #25289 )
3 years ago
chain_indexer.go
core, eth, ethstats: simplify chain head events ( #30601 )
3 months ago
chain_indexer_test.go
all: improve some error strings ( #29842 )
9 months ago
chain_makers.go
core: enable EIP-2935 in chain maker ( #30575 )
3 months ago
chain_makers_test.go
all: remove forkchoicer and reorgNeeded ( #29179 )
6 months ago
dao_test.go
all: remove forkchoicer and reorgNeeded ( #29179 )
6 months ago
error.go
cmd, core, params, trie: add verkle access witness gas charging ( #29338 )
10 months ago
events.go
core, eth, ethstats: simplify chain head events ( #30601 )
3 months ago
evm.go
all: use big.Sign to compare with zero ( #29490 )
11 months ago
gaspool.go
core, miner: revert block gas counter in case of invalid transaction ( #26799 )
2 years ago
gen_genesis.go
core: go fmt ( #29544 )
10 months ago
genesis.go
all: implement EIP-7002 & EIP-7251 ( #30571 )
3 months ago
genesis_alloc.go
all: clean up goerli flag and config ( #30289 )
6 months ago
genesis_test.go
all: remove forkchoicer and reorgNeeded ( #29179 )
6 months ago
headerchain.go
all: remove forkchoicer and reorgNeeded ( #29179 )
6 months ago
headerchain_test.go
all: remove forkchoicer and reorgNeeded ( #29179 )
6 months ago
mkalloc.go
accounts, cmd/geth, core: close opened files ( #29598 )
10 months ago
rlp_test.go
core: move genesis alloc types to core/types ( #29003 )
1 year ago
sender_cacher.go
all: refactor txpool into it's own package in prep for 4844
2 years ago
state_prefetcher.go
all: stateless witness builder and (self-)cross validator ( #29719 )
8 months ago
state_processor.go
all: implement EIP-7002 & EIP-7251 ( #30571 )
3 months ago
state_processor_test.go
core/state: state reader abstraction ( #29761 )
6 months ago
state_transition.go
internal/ethapi: eth_multicall ( #27720 )
6 months ago
stateless.go
beacon, core, eth, miner: integrate witnesses into production Geth ( #30069 )
5 months ago
txindexer.go
core, eth, ethstats: simplify chain head events ( #30601 )
3 months ago
txindexer_test.go
core: use in-memory freezer for tests ( #29720 )
10 months ago
types.go
all: implement flat deposit requests encoding ( #30425 )
3 months ago