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

trie: check childrens' existence concurrently for snap heal #25694

Merged
merged 1 commit into from
Sep 6, 2022

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Sep 6, 2022

During snap heal phase, checking for the existence of children takes a lot of database reads. Currently trie node processing is sequential, and checking for children is too. But an SSD is capable of doing multiple reads simultaneously, so in theory, we can check for children concurrently whilst still keeping the sync algo the same. The result is that the heal phase can max out the disk read capacity versus wasting time.

Note, the benchmark runs were originally the heal throttler, and then swapped to push this PR on top.



@karalabe karalabe added this to the 1.11.0 milestone Sep 6, 2022
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holiman
Copy link
Contributor

holiman commented Sep 6, 2022

Deploying this on westus now. More specifically, these commits:

commit d0e698a9271815d1f6586e344b6c7a910a013455 (HEAD -> exp-pebble)
Author: Péter Szilágyi <peterke@gmail.com>
Date:   Tue Sep 6 12:57:03 2022 +0300

    trie: check childrens' existence concurrently for snap heal

commit a81c3990a90a4247bc5f5870484be7124ddb3857
Author: Martin Holst Swende <martin@swende.se>
Date:   Sat Sep 3 20:45:05 2022 +0200

    trie, eth/protocols/snap: write batches in more meaningful sizes when trie-healing

commit 1f95a39a23e82fe7d462ce41de18ea45a9159a00
Author: Péter Szilágyi <peterke@gmail.com>
Date:   Fri Sep 2 15:26:01 2022 +0300

    eth/protocols/snap: throttle trie heal requests when peers DoS us

commit 3a41cd0de029677cb15ee238c25b77b72d4f993d (jared/exp-pebble)

@holiman
Copy link
Contributor

holiman commented Sep 6, 2022

Screenshot 2022-09-06 at 13-29-33 Single Geth - Grafana

Screenshot 2022-09-06 at 13-30-15 Single Geth - Grafana
Screenshot 2022-09-06 at 13-31-52 Single Geth - Grafana

@karalabe karalabe merged commit d408cb6 into ethereum:master Sep 6, 2022
fjl pushed a commit to fjl/go-ethereum that referenced this pull request Nov 3, 2022
ABastionOfSanity added a commit to cerc-io/go-ethereum that referenced this pull request Nov 4, 2022
* eth/protocols/snap: fix problems due to idle-but-busy peers (ethereum#25651)

* eth/protocols/snap: throttle trie heal requests when peers DoS us (ethereum#25666)

* eth/protocols/snap: throttle trie heal requests when peers DoS us

* eth/protocols/snap: lower heal throttle log to debug

Co-authored-by: Martin Holst Swende <martin@swende.se>

* eth/protocols/snap: fix comment

Co-authored-by: Martin Holst Swende <martin@swende.se>

* trie: check childrens' existence concurrently for snap heal (ethereum#25694)

* eth: fix a rare datarace on CHT challenge reply / shutdown (ethereum#25831)

* eth/filters: change filter block to be by-ref (ethereum#26054)

This PR changes the block field in the filter to be a pointer, to disambiguate between empty hash and no hash

* rpc: handle wrong HTTP batch response length (ethereum#26064)

* params: release geth v1.10.26 stable

* V1.10.25 statediff v4 wip (#275)

* Statediff Geth

Handle conflicts (#244)

* Handle conflicts

* Update go mod file versions

* Make lint changes

Disassociate block number from the indexer object

Update ipld-eth-db ref

Refactor builder code to make it reusable

Use prefix comparison for account selective statediffing

Update builder unit tests

Add mode to write to CSV files in statediff file writer (#249)

* Change file writing mode to csv files

* Implement writer interface for file indexer

* Implement option for csv or sql in file mode

* Close files in CSV writer

* Add tests for CSV file mode

* Implement CSV file for watched addresses

* Separate test configs for CSV and SQL

* Refactor common code for file indexer tests

Update indexer to include block hash in receipts and logs (#256)

* Update indexer to include block hash in receipts and logs

* Upgrade ipld-eth-db image in docker-compose to run tests

Use watched addresses from direct indexing params by default while serving statediff APIs (#262)

* Use watched addresses from direct indexing params in statediff APIs by default

* Avoid using indexer object when direct indexing is off

* Add nil check before accessing watched addresses from direct indexing params

Rebase missed these changes needed at 1.10.20

Flags cleanup for CLI changes and linter complaints

Linter appeasements to achieve perfection

enforce go 1.18 for check (#267)

* enforce go 1.18 for check

* tests on 1.18 as well

* adding db yml for possible change in docker-compose behavior in yml parsing

Add indexer tests for handling non canonical blocks (#254)

* Add indexer tests for header and transactions in a non canonical block

* Add indexer tests for receipts in a non-canonical block and refactor

* Add indexer tests for logs in a non-canonical block

* Add indexer tests for state and storage nodes in a non-canonical block

* Add indexer tests for non-canonical block at another height

* Avoid passing address of a pointer

* Update refs in GitHub workflow

* Add genesis file path to stack-orchestrator config in GitHub workflow

* Add descriptive comments

fix non-deterministic ordering in unit tests

Refactor indexer tests to avoid duplicate code (#270)

* Refactor indexer tests to avoid duplicate code

* Refactor file mode indexer tests

* Fix expected db stats for sqlx after tx closure

* Refactor indexer tests for legacy block

* Refactor mainnet indexer tests

* Refactor tests for watched addressess methods

* Fix query in legacy indexer test

rebase and resolve onto 1.10.23... still error out of index related to GetLeafKeys

changed trie.Commit behavior was subtle about not not flushing to disk without an Update

* no merge nodeset throws nil

* linter appeasement

Cerc refactor (#281)

* first pass cerc refactor in cicd

* 1st attempt to publish binary to git.vdb.to from github release

* docker build step mangled

* docker build step mangled

* wrong username for docker login... which still succeeded

* circcicd is not cerccicd

* bad hostname

adding manual override of binary publish to git.vdb.to for development/emergency (#282)

Cerc io publish fix (#284)

* adding manual override of binary publish to git.vdb.to for development/emergency

* Create manual_binary_publish.yaml (#283)

* github did not pick up workflow added outside of its UI and I still cannot spell cerc right

rawdb helper functions for cold levelDB sync export

Jenkins reborn (#285)

* initial build and output testing...  lots of trial and error

* clean up for working (but failing) unit test geth with ubuntu foundation image

* linter problem on comments in version

* trying linter appeasement with gofmt output on versions.go

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Co-authored-by: Jordan Krage <jmank88@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
0xTomoyo pushed a commit to 0xTomoyo/go-ethereum that referenced this pull request Dec 12, 2022
* params: begin v1.10.19 release cycle

* cmd/geth: exit when freezer has legacy receipts (ethereum#24943)

In ethereum#24028 we flagged a warning when finding legacy receipts in the freezer. This PR nudges users a bit more strongly by preventing geth from starting in this case until receipts have been migrated.

It also adds a flag --ignore-legacy-receipts which when present allows geth to start normally.

* cmd/abigen: accept combined-json via stdin (ethereum#24960)

* params: set emergency ropsten TTD to 100_000_000_000_000_000_000_000 (ethereum#24975)

* core: use less memory during reorgs (ethereum#24616)

This PR significantly reduces the memory consumption of a long reorg

* cmd/geth: extend traverseRawState command (ethereum#24954)

This PR adds node verification into traverseRawState command, so corrupted trie nodes can also be detected.

* consensus/clique: fix race condition (ethereum#24957)

* consensus/clique: remove race condition

* consensus/clique: fix one more signer data race

Co-authored-by: Gary Rong <garyrong0905@gmail.com>

* eth/catalyst: fix edge case in NewPayload (ethereum#24955)

Fixes an issue where we would accept a NewPayload where the grandparent is already post ttd, and the parent still has a Difficulty

* contracs/checkpointoracle: fix directives (ethereum#24944)

contracts/checkpointoracle: redefine go-generate logic

* eth/filters: use buffered channel to avoid goroutine leak (ethereum#24928)

* core/beacon: prevent invalid logsBloom length panic (ethereum#24946)

* core/beacon: prevent invalid logsBloom length panic

* core/beacon: prevent negative baseFeePerGas

* Update core/beacon/types.go

Co-authored-by: Martin Holst Swende <martin@swende.se>

* eth/catalys: go format

Co-authored-by: Martin Holst Swende <martin@swende.se>

* core: fix canonical hash marker update (ethereum#24996)

* core: fix reorg

* core: revert change for memory efficiency

* core: revert changes

* eth/tracers: add support for block overrides in debug_traceCall (ethereum#24871)

This PR adds support for block overrides when doing debug_traceCall.

- Previously, debug_traceCall against pending erroneously used a common.Hash{} stateroot when looking up the state, meaning that a totally empty state was used -- so it always failed,
- With this change, we reject executing debug_traceCall against pending.
- And we add ability to override all evm-visible header fields.

* tests/fuzzers/bls12381: Add BLST to fuzzing support (ethereum#24249)

* tests/fuzzers/bls12381: added blst library

* go.mod: added blst dependency

* tests/fuzzers/bls12381: stuff

* tests/fuzzers/bls12381: added blst to pairing fuzzer

* eth/catalyst: return 0x0 on Invalid block on top of pow block (ethereum#25006)

* node: make jwt test less dependent on time (ethereum#25016)

* consensus/misc: reduce allocations and improve comments in CalcBaseFee (ethereum#24958)

* consensus/misc: reduce allocations in CalcBaseFee

* consensus/misc: add formulas of CalcBaseFee

* go.mod: set go version to 1.17 (ethereum#24926)

set go version to 1.17

* go.mod: clean up (ethereum#25017)

* core/vm: optimize jumpdest analysis (ethereum#23500)

core/vm: optimize PUSH opcode discrimination

* tests/fuzzers/bls12381: fix blst deserializing (ethereum#25036)

* tests/fuzzers/bls12381: fix blst deserializing

* tests/fuzzers/bls12381: fix blst deserializing

* cmd/geth, core/state/snapshot: rework journal loading, implement account-check (ethereum#24765)

* cmd/geth, core/state/snapshot: rework journal loading, implement account-check

* core/state/snapshot, cmd/geth: polish code (ethereum#37)

* core/state/snapshot: minor nits

* core/state/snapshot: simplify error logic

* cmd/geth: go format

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

* all: introduce trie owner notion (ethereum#24750)

* cmd, core/state, light, trie, eth: add trie owner notion

* all: refactor

* tests: fix goimports

* core/state/snapshot: fix ineffasigns

Co-authored-by: Martin Holst Swende <martin@swende.se>

* eth/api: use `hexutil.Bytes` for account range method (ethereum#25024)

eth/api: use hexutil.Bytes for range at methods

* eth/tracers: fix typo in 4byte_tracer_legacy.js (ethereum#25020)

indentifier -> identifier

* trie: move locking into trieDB insert method (ethereum#25030)

Move locking into trieDB insert function

* params: update ropsten terminal total difficulty block (ethereum#25018)

* eth/filters: fix getLogs for pending block (ethereum#24949)

* eth/filters: fix pending for getLogs

* add pending method to test backend

* fix block range validation

* accounts/abi/bind: fix duplicate field names in the generated go struct (ethereum#24924)

* accounts/abi/bind: fix duplicate field names in the generated go struct ethereum#24627

* accounts, cmd/abigen: resolve name conflicts

* ci lint, accounts/abi: remove unused function overloadedArgName

Co-authored-by: Gary Rong <garyrong0905@gmail.com>

* tests/fuzzers/bls12381: fix blst pairing (ethereum#25037)

* tests/fuzzers/bls12381: fix blst pairing

* tests/fuzzers/bls12381: only build on gofuzz

* tests/fuzzers/bls12381: remove unused code

* tests/fuzzers/bls12381: remove unused code

* p2p/discover: fix panicky test (ethereum#25038)

* accounts: increase parseURL test coverage (ethereum#25033)

accounts/url: add test logic what check null string to parseURL()

* eth, les, params: log chain config a bit saner (ethereum#24904)

Previously on Geth startup we just logged the chain config is a semi-json-y format. Whilst that worked while we had a handful of hard-forks defined, currently it's kind of unwieldy. 

This PR converts that original data dump and converts it into a user friendly - alas multiline - log output.

* p2p: use errors.Is for error comparison (ethereum#24882)


Co-authored-by: Felix Lange <fjl@twurst.com>

* rpc: swap out timer metrics to histograms

* eth/catalyst: remove unauthenticated 'engine' api (ethereum#24997)

Removes engine from any unauthenticated RPC service.

* core/types: remove unused field 'td' in Block (ethereum#25010)

* core/types: improve LogForStorage and ReceiptForStorage comments (ethereum#25032)


Co-authored-by: Felix Lange <fjl@twurst.com>

* core/evm: fix error in comment (ethereum#25040)


Co-authored-by: Martin Holst Swende <martin@swende.se>

* internal/ethapi: fix typo in comment (ethereum#25056)

typo error: keccack256 -> keccak256

* Chore:  Minimal gramatical errors (signleton -> singleton) (ethereum#25057)

core: fix typos

* all: more linters (ethereum#24783)

This enables the following linters

- typecheck
- unused
- staticcheck
- bidichk
- durationcheck
- exportloopref
- gosec

WIth a few exceptions.

- We use a deprecated protobuf in trezor. I didn't want to mess with that, since I cannot meaningfully test any changes there.
- The deprecated TypeMux is used in a few places still, so the warning for it is silenced for now.
- Using string type in context.WithValue is apparently wrong, one should use a custom type, to prevent collisions between different places in the hierarchy of callers. That should be fixed at some point, but may require some attention.
- The warnings for using weak random generator are squashed, since we use a lot of random without need for cryptographic guarantees.

* cmd/utils: update --ropsten description (ethereum#25078)

* readme,eth: remove references to eth.wiki (ethereum#25086)

* cmd/ethkey: use accounts.TextHash (ethereum#25069)

* common: improve pretty duration regex (ethereum#25073)

* common: improve pretty duration regex

* common: improve pretty duration regex

* all: prefer `new(big.Int)` over `big.NewInt(0)` (ethereum#25087)

minor performance improvement: `big.NewInt(0).Xxx` -> `new(big.Int).Xxx`

* eth: add missing period at end of sentences (ethereum#25058)

eth: add missing periods on end of comments

* eth: introduce eth67 protocol (ethereum#24093)

The new protocol version removes support for GetNodeData.
See https://eips.ethereum.org/EIPS/eip-4938 for more information.

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>

* cmd, params: implement Gray Glacier hard-fork (EIP-5133) (ethereum#25088)

* cmd/geth, params: implement Gray Glacier (EIP-5133)

* cmd/evm: add gray glacier tests

* params: nitpicks

* params: fixes

* node: add info message when JWT secret is loaded (ethereum#25095)


Co-authored-by: Felix Lange <fjl@twurst.com>

* params: release Geth v1.10.19

* params: begin v1.10.20 release cycle

* internal/ethapi: add comment explaining return of nil instead of error (ethereum#25097)


Co-authored-by: Felix Lange <fjl@twurst.com>

* tests/fuzzers/rlp: avoid very large input (ethereum#25109)

The oss-fuzz engine crashes due to stack overflow decoding a large nested
structure into a interface{}. This PR limits the size of the input data, so
should avoid such crashes.

* node: make jwt tests less time-dependent (ethereum#25120)

* cmd/faucet: more verbose message about private posts (ethereum#25129)

* cmd/faucet: Add error message for private posts

Fixes ethereum#22631

* grammar

* internal/ethapi: remove SignAndSendTransaction (ethereum#25111)

* cmd/faucet: add sepolia network support (ethereum#25128)

cmd/faucet: Add Sepolia network support to faucet

* trie: fix size accounting in cleaner (ethereum#25007)

Decrease children size instead of dirties size when marking dirties as cleaned up in trie cleaner

* all: remove concept of public/private API definitions (ethereum#25053)

* internal/ethapi: rename PublicEthereumAPI to EthereumAPI

* eth: rename PublicEthereumAPI to EthereumAPI

* internal/ethapi: rename PublicTxPoolAPI to TxPoolAPI

* internal/ethapi: rename PublicAccountAPI to EthereumAccountAPI

* internal/ethapi: rename PrivateAccountAPI to PersonalAccountAPI

* internal/ethapi: rename PublicBlockChainAPI to BlockChainAPI

* internal/ethapi: rename PublicTransactionPoolAPI to TransactionAPI

* internal/ethapi: rename PublicDebugAPI to DebugAPI

* internal/ethapi: move PrivateDebugAPI methods to DebugAPI

* internal/ethapi: rename PublicNetAPI to NetAPI

* les: rename PrivateLightServerAPI to LightServerAPI

* les: rename PrivateLightAPI to LightAPI

* les: rename PrivateDebugAPI to DebugAPI

* les: rename PublicDownloaderAPI to DownloaderAPI

* eth,les: rename PublicFilterAPI to FilterAPI

* eth: rename PublicMinerAPI to MinerAPI

* eth: rename PublicDownloaderAPI to DownloaderAPI

* eth: move PrivateMinerAPI methods to MinerAPI

* eth: rename PrivateAdminAPI to AdminAPI

* eth: rename PublicDebugAPI to DebugAPI

* eth: move PrivateDebugAPI methods to DebugAPI

* node: rename publicAdminAPI to adminAPI

* node: move privateAdminAPI methods to adminAPI

* node: rename publicWeb3API to web3API

* eth,internal/ethapi: sync comments with previous renamings

* cmd/geth: drop geth js command (ethereum#25000)

* cmd/geth: drop js command

* cmd: simplify ipc path determination for attach

* Add deprecation warning for js

* rm testdata for exec

* fix account unlock test cases

* Update cmd/geth/consolecmd.go

Co-authored-by: Martin Holst Swende <martin@swende.se>

* fix

Co-authored-by: Martin Holst Swende <martin@swende.se>

* README,rpc: remove mention of "shh" RPC API (ethereum#25137)

* eth, miner: retrieve mining state from live database (ethereum#25139)

* miner: retrieve mining state from live database

* eth/catalyst: ignore stale fcu events from cl

* core: fix typo in txpool (ethereum#25149)

Fix typo in txPool truncateQueue comment

* go.mod: upgrade to latest goleveldb (ethereum#25067)


Co-authored-by: Felix Lange <fjl@twurst.com>

* eth/tracers: optimize goja buffer conversion (ethereum#25156)

This changes the []byte <-> Uint8Array conversion to use an
ArrayBuffer, avoiding inefficient copying of the slice data in Goja.

Co-authored-by: Felix Lange <fjl@twurst.com>

* eth: fix typo (ethereum#25161)

* internal/ethapi: always return chain id (ethereum#25166)

The error was introduced in PR ethereum#21686, but there is no good reason to enforce sync
in this method, and it causes issues with EL/CL integration.

* internal/ethapi: add note about eth_chainId compatibility with EIP-695 (ethereum#25168)


Co-authored-by: Felix Lange <fjl@twurst.com>

* all: remove `public` field from `rpc.API` (ethereum#25059)

all: remove public field from rpc.API

* all: remove version field from rpc.API

* cmd: migrate to urfave/cli/v2 (ethereum#24751)

This change updates our urfave/cli dependency to the v2 branch of the library.
There are some Go API changes in cli v2:

- Flag values can now be accessed using the methods ctx.Bool,
  ctx.Int, ctx.String, ... regardless of whether the flag is 'local' or
  'global'.

- v2 has built-in support for flag categories. Our home-grown category
  system is removed and the categories of flags are assigned as part of
  the flag definition.

For users, there is only one observable difference with cli v2: flags must now
strictly appear before regular arguments. For example, the following command is
now invalid:

   geth account import mykey.json --password file.txt

Instead, the command must be invoked as follows:

   geth account import --password file.txt mykey.json

* params: set TTD for sepolia testnet (ethereum#25179)

* cmd/geth, p2p: add support for custom discovery UDP port (ethereum#24979)

This adds a new flag to set the discovery port to be different from
the TCP listener port.

Co-authored-by: Felix Lange <fjl@twurst.com>

* fix: linter warning (ethereum#25192)

* core/rawdb: fix typo in comment (ethereum#25191)

* core/rawdb: simplify TestDiskSeek to use memorydb (ethereum#25182)

* cmd/utils: fix applying bootstrap nodes from config file (ethereum#25174)

* internal/ethapi: return chain id for EIP-155 legacy txs (ethereum#25155)

* common: increase StorageSize test coverage (ethereum#25188)

* consensus/beacon: check that only the latest pow block is valid ttd block (ethereum#25187)

* consensus/beacon: check that only the latest pow block is valid ttd block

* consensus/beacon: move verification to async function

* consensus/beacon: fix verifyTerminalPoWBlock, add test cases

* consensus/beacon: cosmetic changes

* consensus/beacon: apply karalabe's fixes

* build: fix auto-completion scripts and include them in .deb package (ethereum#25195)


Co-authored-by: Felix Lange <fjl@twurst.com>

* build: upgrade to golangci-lint v1.46.2 (ethereum#25202)

This upgrade is required to fix lint issues with urfave/cli/v2, which
uses generics when built with Go 1.18

* build/deb: fix auto-completion install paths (ethereum#25204)

* params: go-ethereum v1.10.20 stable

* params: begin v1.10.21 release cycle

* common/prque: fix typo

* eth/catalyst: disallow importing blocks via newPayload during snap sync (ethereum#25210)

* eth/catalyst: disallow importing blocks via newPayload during snap sync

* eth/catalyst: make tests pass by using full sync only

* eth/catalysts: make the import delay a bit cleaner

* eth/catalyst: fix typo

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

* Replace fmt.Errorf with errors.New in abi argument (ethereum#25181)

Replace unnecessary fmt.Errorf with errors.New in accounts/abi/argument.go

* all: change format `0x%x` to `%#x` (ethereum#25221)

* consensus/beacon: copy td value so we can modify it (ethereum#25230)

* consensus/beacon: copy td value so we can modify it

* consensus/beacon: copy td value so we can modify it

* core: allow external code to set the block validator for malicious tests (ethereum#25119)

* core: don't validate state

* core: allow external validator

* core: revert

* core: comments

* Update blockchain_reader.go

* core: move SetValidator to blockchain.go

* core: rename method

* core: apply ttd override to uninitialized db (ethereum#25136)

* core: apply ttd override to genesis block

* core: apply overrides properly

* signer/core/apitypes: support primitive types int96/uint96 (ethereum#25105)

I have a EIP712 typehash using uint96, but it's currently not supported
by go-ethereum. This change fixes it.

* cmd/geth, cmd/devp2p: fix some cli parsing issues (ethereum#25234)

* cmd/geth: add some missing argument count checks

* internal/flags: skip cmds with no action func in MigrateGlobalFlags

* internal/flags: add Merge

* cmd/devp2p: re-add listener config flags in discv4 commands

* core: allow external processor (ethereum#25233)

* consensus/beacon: verify timestamp is greater than parent timestamp (ethereum#25236)

* go.mod: updated logfmt dependency (ethereum#25231)

This fixes an issue in abigen tests with go 1.17.

* internal/ethapi: add basefee to block overrides (ethereum#25219)

* build: upgrade -dlgo version to Go 1.18.3

* trie: fix typo in comment (ethereum#25241)

paralallel -> parallel

* core/types: fix typo in comment (ethereum#25249)

* internal/ethapi: fix chain ID check to return all non-zero IDs (ethereum#25244)

* rpc: add graceful shutdown timeout for HTTP server (ethereum#25258)

This change ensures the HTTP server will always terminate within
at most 5s, even when all connections are busy and do not become
idle.

Co-authored-by: Felix Lange <fjl@twurst.com>

* p2p/discover: fix typos in comments (ethereum#25272)

* core, eth: pre-allocate map in storage copy (ethereum#25279)

* eth/tracers: add initial revertReasonTracer tracer (ethereum#25265)

Adds a native tracer that returns that in case of failure returns the error message or the revert reason of a transaction.

Co-authored-by: Martin Holst Swende <martin@swende.se>

* params: enable DNS discovery on Sepolia too

* internal/build: add a timestamp to the tar archive folder

* build: upgrade -dlgo version to Go 1.18.4

* accounts/abi: fix typo in comment (ethereum#25271)

* accounts/abi/bind/backends: return hash of new blocks (ethereum#25163)


Co-authored-by: Jens <jmw.1906@gmx.de>

* internal/ethapi: error if tx args includes chain id that doesn't match local (ethereum#25157)

* internal/ethapi: error if tx args includes chain id that doesn't match local

* internal/ethapi: simplify code a bit

Co-authored-by: Péter Szilágyi <peterke@gmail.com>

* core: remove lock in BlockChain.ExportN (ethereum#25254)

* Remove locking in (*BlockChain).ExportN

Since ExportN is read-only, it shouldn't need the lock. (?)

* Add hash check to detect reorgs during export.

* fix check order

* Update blockchain.go

* Update blockchain.go

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

* core: prevent negative fee during RPC calls (ethereum#25214)

During RPC calls such as eth_call and eth_estimateGas, st.evm.Config.NoBaseFee is set
which allows the gas price to be below the base fee. This results the tip being negative,
and balance being subtracted from the coinbase instead of added to it, which results in a
potentially negative coinbase balance interestingly. This can't happen during normal chain
processing as outside of RPC calls the gas price is required to be at least the base fee,
as NoBaseFee is false.

This change prevents this behavior by disabling fee payment when the fee is not set.

Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>

* core, les, eth: port snap sync changes (ethereum#24898)

core, eth, les, trie: rework snap sync

* tests: only activate merge on london rules (ethereum#25239)

* trie: fix 'gosimple' lint issue (ethereum#25309)

* p2p/discover: apply netrestrict in discv5 response handler (ethereum#25304)

* cmd/geth: remove redundant 0x in dbGet/dbDelete (ethereum#25315)

* accounts/abi: substitude arg%d to the range keyword (ethereum#25307)

* accounts/abi: substitude arg%d to the range keyword

* support more keywords

* review feedback

* params: Add Shanghai and Cancun blocks (ethereum#25305)

* params: Add Shangai and Cancun blocks

* fix copy/paste error

Co-authored-by: Martin Holst Swende <martin@swende.se>

* fix typo in Shanghai name

Co-authored-by: Martin Holst Swende <martin@swende.se>

* params: change Merge config to print simpler message

This fixes ethereum#25366

* cmd/puppeth: remove support for exporting non-Geth genesis configurations (ethereum#25329)

* cmd/puppeth: remove support for exporting non-Geth genesis configurations

* remove unused function

* params: set goerli TTD to 10_790_000 (ethereum#25324)

* signer/core: add canonical TypedData hashing methods (ethereum#25283)

* deps: update goleveldb

* params: set sepolia mergeNetsplitBlock to 1735371 (ethereum#25372)

* cmd/geth: eth/catalyst: enable authrpc by default (ethereum#25152)

* cmd/geth: eth/catalyst: enable authrpc by default

* eth/catalyst: rename catalyst -> Engine API in logs

* eth/catalyst: don't panic

* eth/catalyst: better warning for ttd not configured (ethereum#25394)

* cmd: use flags.Merge for grouping flags (ethereum#25392)

* consensus/beacon: fix typo in comment (ethereum#25391)

* p2p/netutil: minor code cosmetic

Signed-off-by: Abirdcfly <fp544037857@gmail.com>

* eth, internal, light: fix error string capitalization (ethereum#25364)

* light: fix differTries err message in tests (ethereum#25358)

* all: add whitespace linter (ethereum#25312)

* golangci: typo

Signed-off-by: Delweng <delweng@gmail.com>

* golangci: add whietspace

Signed-off-by: Delweng <delweng@gmail.com>

* *: rm whitesapce using golangci-lint

Signed-off-by: Delweng <delweng@gmail.com>

* cmd/puppeth: revert accidental resurrection

Co-authored-by: Péter Szilágyi <peterke@gmail.com>

* eth/tracers/js: fix capitalization in tests

* eth: support bubbling up bad blocks from sync to the engine API (ethereum#25190)

* eth: support bubbling up bad blocks from sync to the engine API

* eth/catalyst: fix typo

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

* eth/catalyst: fix typo

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

* Update eth/catalyst/api.go

* eth/catalyst: when forgetting bad hashes, also forget descendants

* eth/catalyst: minor bad block tweaks for resilience

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Martin Holst Swende <martin@swende.se>

* core: eth: rpc: implement safe rpc block (ethereum#25165)

* core: eth: rpc: implement safe rpc block

* core: fix setHead, panics

* go.mod: downgrade leveldb (ethereum#25413)

* params: go-ethereum v1.10.21 stable

* params: begin v1.10.22 release cycle

* core, trie, eth, cmd: rework preimage store (ethereum#25287)

* core, trie, eth, cmd: rework preimage store

* trie: address comment

* eth/catalyst: fix NewPayload warn log when dropping due to snap sync

* node: set JWT expiry to 60 seconds (ethereum#25416)

* node: set JWT expiry to 60 seconds

* node: rename var

* eth/catalyst: return syncing not accepted (ethereum#25414)

* eth/catalyst: return syncing not accepted

* eth/catalyst: fix test

* eth/catalyst: return 0x0 if latestvalid is pow block (ethereum#25423)

* eth/catalyst: return 0x0 if latestvalid is pow block

* eth/catalyst: return 0x0 if latestvalid is pow block

* eth/catalyst: fix header retrieval, fix sign check

Co-authored-by: Péter Szilágyi <peterke@gmail.com>

* ethereum, ethclient: add FeeHistory support (ethereum#25403)


Co-authored-by: Felix Lange <fjl@twurst.com>

* all: use AbsTime.Add instead of conversion (ethereum#25417)

* cm/puppeth: fix crash when of ethstats specifier doesn't contain `:` (ethereum#25405)


Signed-off-by: Delweng <delweng@gmail.com>

* eth: fix typo in comment (ethereum#25327)

* common/compiler: json unmarshalling error checks (ethereum#25449)

complier/solidity:add json.Unmarshal err check

* cmd, core, eth, les, params: add merge-passed chain config (ethereum#24538)

* cmd, core, eth, les, params: add merge-passed chain config

* eth/catalyst, params: add various warning on malfunctioning beacons

* eth/catalyst: fix warning for beacons without transition exchanges

* eth: fix typo in catalyst api (ethereum#25460)

eth: fix typo

* build: upgrade -dlgo version to Go 1.18.5

* eth/gasprice/feehistory: support finalized block (ethereum#25442)

* consensus/ethash: remove temp files created during DAG generation (ethereum#25381)

This makes it remove not only the actual DAG file, but also the temporary file
which the DAG data is written to while generating.

* cmd/devp2p/internal/ethtest: update tests for eth/67 (ethereum#25306)

* node, rpc: add ReadHeaderTimeout config option (ethereum#25338)

This change makes http.Server.ReadHeaderTimeout configurable separately
from ReadTimeout for RPC servers. The default is set to the same as
ReadTimeout, which in order to cause no change in existing deployments.

* core/types: fix typo in comment (ethereum#25359)

* core: preallocate batch size in bloomIndexer (ethereum#25289)

This change reduces allocations when committing bloombits indexes
by creating the database batch with a larger initial size.

* internal/ethapi: don't estimate gas if no limit provided in eth_createAccessList (ethereum#25467)

Because the goal of eth_createAccessList is providing the caller with the largest-possible
access list, it's generally not important that the gas limit used by the tracer will match the usage
of the call exactly. Avoiding the gas estimation step is a performance improvement. As long as the
call does not branch based on gas limit, the returned access list will be accurate.

* graphql: embed *Resolver instead of backend interface (ethereum#25468)

This creates some infrastructure to share resources between graphql
API objects.

* node: remove noop path.Join (ethereum#25475)

Signed-off-by: Delweng <delweng@gmail.com>

* core, trie: rework trie committer (ethereum#25320)

* all: rework trie and trie committer

* all: get rid of internal cache in trie

* all: fixes

* trie: polish

* core, trie: address comments

* trie: fix imports

* core/state: address comments

* core/state/snapshot: polish

* trie: remove unused code

* trie: update tests

* trie: don't set db as nil

* trie: address comments

* trie: unskip test

* core: use TryGetAccount to read what TryUpdateAccount has written (ethereum#25458)

* core: use TryGetAccount to read where TryUpdateAccount has been used to write

* Gary's review feedback

* implement Gary's suggestion

* fix bug + rename NewSecure into NewStateTrie

* trie: add backwards-compatibility aliases for SecureTrie

* Update database.go

* make the linter happy

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

* cmd, core, ethdb, node: move chain freezer one folder deeper (ethereum#25487)

* cmd, core, ethdb, node: create chain freezer in a sub folder

* core/rawdb: remove unused code

* core, ethdb, node: add AncientDatadir API back

* cmd, core: extend freezer info dump for sub-ancient-store

* core/rawdb: rework freezer inspector

* core/rawdb: address comments from Peter

* core/rawdb: fix build issue

* eth/downloader: fix log errors of queue_test.go (ethereum#25494)

* core: fix uncle creation in TestFastVsFullChains (ethereum#25476)


Co-authored-by: Felix Lange <fjl@twurst.com>

* eth: formatted error nit (ethereum#25499)

* eth/tracers: add onlyTopCall option to callTracer (ethereum#25430)

This PR allows users to pass in a config object directly to the tracers. Previously only the struct logger was configurable.

It also adds an option to the call tracer which if enabled makes it ignore any subcall and collect only information about the top-level call. See ethereum#25419 for discussion.

The tracers will silently ignore if they are passed a config they don't care about.

* all: cleanup the APIs for initializing genesis (ethereum#25473)

* all: polish tests

* core: apply feedback from Guillaume

* core: fix comment

* core: remove unused bc ChainContext in applyTransaction

* signer/rules: register clef api properly when rules are used (ethereum#25455)

signer/rules: register clef api properly when rules are used, fixes ethereum#25298

* build: add static linking support (ethereum#25492)

This adds support for building statically-linked executables using ci.go.

Static linking is enabled by default in Docker builds, making it possible to
use the geth executable in any Docker image, regardless of the Linux
distribution the Dockerfile is based on.

Co-authored-by: Felix Lange <fjl@twurst.com>

* accounts/abi: display name in "method/event not found" error (ethereum#25512)

* internal/ethapi: rework setDefaults for tx args so fee logic is separate (ethereum#25197)


Co-authored-by: bobpkr <bob.p@krustuniverse.com>

* core/genesis: remove calaverasAllocData (ethereum#25516)

core/genesis: calaverasAllocData no longer used

* params: set ttdpassed on goerli (ethereum#25519)

* params: set mainnet terminal total difficulty for the merge (ethereum#25528)

* params: set mainnet ttd to 58_750_000_000_000_000_000_000

* params: set mainnet ttd to 58_750_000_000_000_000_000_000

* core, trie: flush preimages to db on blockchain close (ethereum#25533)

* core, trie: flush preimages to db on database close

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

* rename Close to CommitPreimages for clarity

* core, trie: nitpick fixes

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>

* core/state, trie, light: add a TryDeleteAccount method (ethereum#25531)

* core/state, trie, light: Add a DeleteAccount method

* review feedback

* Update database.go

* pr triage feedback

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

* core: make tx journal check and open atomic (ethereum#25530)

* core: reduce system call about `os`

* avoid deprecated method

* cmd. core: save preimages on genesis creation (ethereum#25538)

force preimage dump for genesis

* rlp/rlpgen: fix error handling when target type not found (ethereum#25547)

typ will be nil when lookupStructType returns an error. cfg.Type should be used instead.

* trie: improve node rlp decoding performance (ethereum#25357)

This avoids copying the input []byte while decoding trie nodes. In most
cases, particularly when the input slice is provided by the underlying
database, this optimization is safe to use.

For cases where the origin of the input slice is unclear, the copying version
is retained. The new code performs better even when the input must be
copied, because it is now only copied once in decodeNode.

* all: fix some typos (ethereum#25551)

* Fix some typos

* Fix some mistakes

* Revert 4byte.json

* Fix an incorrect fix

* Change files to fails

* internal/ethapi: fix comment typo (ethereum#25548)

* accounts/abi/bind/backends: typo fix (ethereum#25549)

* eth, les: unlock downloader peerSet if there's an error (ethereum#25546)

Unlock peerSet if there's an error in the downloader

* cmd/geth: parse uint64 value with ParseUint instead of Atoi (ethereum#25545)

Parse uint64 value with ParseUint instead of Atoi

* consensus/beacon: check ttd reached on pos blocks (ethereum#25552)

* consensus/beacon: check ttd reached on pos blocks

* consensus/beacon: check ttd reached on pos blocks

* consensus/beacon: check ttd reached on pos blocks

* eth/filters: add global block logs cache (ethereum#25459)

This adds a cache for block logs which is shared by all filters. The cache
size of is configurable using the `--cache.blocklogs` flag.

Co-authored-by: Felix Lange <fjl@twurst.com>

* accounts/abi: fix set function (ethereum#25477)

* accounts/abi: fix set function

* don't break things

* update test

* internal/ethapi: fix build regression (ethereum#25555)

* eth/fetcher: don't spend too much time on transaction inclusion (ethereum#25524)

* eth/fetcher: introduce some lag in tx fetching

* eth/fetcher: change conditions a bit

* eth/fetcher: use per-batch quota check

* eth/fetcher: fix some comments

* eth/fetcher: address review concerns

* eth/fetcher: fix panic + add warn log

* eth/fetcher: fix log

* eth/fetcher: fix log

* cmd/devp2p/internal/ethtest: fix ignorign tx announcements from prev. tests

* cmd/devp2p/internal/ethtest: fix TestLargeTxRequest

This increases the number of tx relay messages the test waits for. Since
go-ethereum now processes incoming txs in smaller batches, the
announcement messages it sends are also smaller.

Co-authored-by: Felix Lange <fjl@twurst.com>

* Revert "eth/fetcher: don't spend too much time on transaction inclusion" (ethereum#25567)

Revert "eth/fetcher: don't spend too much time on transaction inclusion (ethereum#25524)"

This reverts commit 0ce494b.

* eth/catalyst: warn less frequently if no beacon client is available (ethereum#25569)

* eth/catalyst: warn less frequently if no beacon client is available

* eth/catalyst: tweak warning frequency a bit

* eth/catalyst: some more tweaks

* Update api.go

Co-authored-by: Felix Lange <fjl@twurst.com>

* params: release go-ethereum v1.10.22

* params: begin v1.10.23 release cycle

* core, eth/downloader: handle spurious junk bodies from racey rollbacks (ethereum#25578)

* eth/downloader: handle junkbodies/receipts in the beacon sync

* core: check for header presence when checking for blocks

* core/state, trie: fix trie flush order for proper pruning

* consensus/beacon: don't ignore errors

* params: release Geth v1.10.23

* graphql: return correct logs for tx (ethereum#25612)

* graphql: fix tx logs

* minor

* Use optimized search for selecting tx logs

* graphql: fixes missing tx logs (ethereum#25745)

* graphql: fix tx logs

* graphql: refactor test service setup

* graphql: add test for tx logs

* Release Geth v1.10.24

* params: set TerminalTotalDifficultyPassed to true (ethereum#25769)

* params: set TerminalTotalDifficultyPassed to true

* Update params/config.go

Co-authored-by: Martin Holst Swende <martin@swende.se>

* params: release Geth v1.10.25

* eth/protocols/snap: fix problems due to idle-but-busy peers (ethereum#25651)

* eth/protocols/snap: throttle trie heal requests when peers DoS us (ethereum#25666)

* eth/protocols/snap: throttle trie heal requests when peers DoS us

* eth/protocols/snap: lower heal throttle log to debug

Co-authored-by: Martin Holst Swende <martin@swende.se>

* eth/protocols/snap: fix comment

Co-authored-by: Martin Holst Swende <martin@swende.se>

* trie: check childrens' existence concurrently for snap heal (ethereum#25694)

* eth: fix a rare datarace on CHT challenge reply / shutdown (ethereum#25831)

* eth/filters: change filter block to be by-ref (ethereum#26054)

This PR changes the block field in the filter to be a pointer, to disambiguate between empty hash and no hash

* rpc: handle wrong HTTP batch response length (ethereum#26064)

* params: release geth v1.10.26 stable

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
Signed-off-by: Delweng <delweng@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Harry Kalodner <harry.kalodner@gmail.com>
Co-authored-by: Boqin Qin(秦 伯钦) <Bobbqqin@gmail.com>
Co-authored-by: Ivan Kuznetsov <me@jeiwan.ru>
Co-authored-by: Jonathan Le Brun <42697488+icyfry@users.noreply.github.com>
Co-authored-by: s7v7nislands <s7v7nislands@gmail.com>
Co-authored-by: Paweł Bylica <chfast@gmail.com>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
Co-authored-by: aaronbuchwald <aaron.buchwald56@gmail.com>
Co-authored-by: lwh <lwhile521@gmail.com>
Co-authored-by: Seungbae.yu <72970043+dbadoy@users.noreply.github.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Rajaram Gaunker <zimbabao@gmail.com>
Co-authored-by: henridf <henri@dubfer.com>
Co-authored-by: int88 <106391185+int88@users.noreply.github.com>
Co-authored-by: Luozhu <70309026+LuozhuZhang@users.noreply.github.com>
Co-authored-by: Gustavo Silva <GustavoRSSilva@users.noreply.github.com>
Co-authored-by: Ivan Aracki <aracki.ivan@gmail.com>
Co-authored-by: lmittmann <lmittmann@users.noreply.github.com>
Co-authored-by: Kosuke Taniguchi <73885532+TaniguchiKosuke@users.noreply.github.com>
Co-authored-by: Zachinquarantine <Zachinquarantine@protonmail.com>
Co-authored-by: ucwong <ucwong@126.com>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: willian.eth <willian@ufpa.br>
Co-authored-by: zeim839 <50573884+zeim839@users.noreply.github.com>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Co-authored-by: Ruohui Wang <nomaru@outlook.com>
Co-authored-by: Andre Patta <andre_luis@outlook.com>
Co-authored-by: スパイク <1311798+spkjp@users.noreply.github.com>
Co-authored-by: Marius Kjærstad <mkjaerstad@protonmail.com>
Co-authored-by: Brion <4777457+cifer76@users.noreply.github.com>
Co-authored-by: Philip Fan <fanwengang@hotmail.com>
Co-authored-by: Jens W <8270201+DragonDev1906@users.noreply.github.com>
Co-authored-by: Jens <jmw.1906@gmx.de>
Co-authored-by: henridf <henridf@gmail.com>
Co-authored-by: Lee Bousfield <ljbousfield@gmail.com>
Co-authored-by: Ha ĐANG <dvietha@gmail.com>
Co-authored-by: jwasinger <j-wasinger@hotmail.com>
Co-authored-by: Nikhil Suri <nikhilsuri@comcast.net>
Co-authored-by: Abirdcfly <fp544037857@gmail.com>
Co-authored-by: Eval EXEC <execvy@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Rithwik Babu <rithwikbabu2020@gmail.com>
Co-authored-by: Henry <101552941+henry-0@users.noreply.github.com>
Co-authored-by: Manoj Kumar <mnjkmr398@gmail.com>
Co-authored-by: Tristan-Wilson <87238672+Tristan-Wilson@users.noreply.github.com>
Co-authored-by: yong <33920876+yzhaoyu@users.noreply.github.com>
Co-authored-by: Seungbae Yu <dbadoy4874@gmail.com>
Co-authored-by: ycyraum <ycyraum@fastmail.com>
Co-authored-by: 0xe3b0c4 <110295932+0xe3b0c4@users.noreply.github.com>
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
Co-authored-by: bobpkr <bob.p@krustuniverse.com>
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
Co-authored-by: zhiqiangxu <652732310@qq.com>
Co-authored-by: Jordan Krage <jmank88@gmail.com>
cp-wjhan pushed a commit to cp-yoonjin/go-wemix that referenced this pull request Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants