Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All Commits From Geth Since go-quai Was Created (dominant-strategies#84)
* internal/ethapi: accept both hex and decimal for blockCount (#23363) * core/state/pruner: fix state bloom sync permission in Windows * mobile: remove deprecated code (#23357) * core/state/snapshot: fix typo in comment (#23219) * core/state/snapshot: clarify comment about snapshot repair (#23305) Co-authored-by: Tyler Chambers <[email protected]> Co-authored-by: Felix Lange <[email protected]> * internal/ethapi: return maxFeePerGas for gasPrice for EIP-1559 txs (#23345) * internal/ethapi, accounts/abi/bind: cap highest gas limit by account balance for 1559 fee parameters (#23309) * internal/ethapi/api: cap highest gas limit by account balance for 1559 fee parameters * accounts/abi/bind: port gas limit cap for 1559 parameters to simulated backend * accounts/abi/bind: add test for 1559 gas estimates for the simulated backend * internal/ethapi/api: fix comment * accounts/abi/bind/backends, internal/ethapi: unify naming style Co-authored-by: Péter Szilágyi <[email protected]> * core/state/snapshot: gofmt * travis: transition from docker auto builds to manual pushes * build: fix docker tag to include `v` prefix in version string * internal/ethapi: add back missing check for maxfee < maxPriorityFee * params: release Geth v1.10.7 * params: begin v1.10.8 release cycle * core/rawdb: implement sequential reads in freezer_table (#23117) * core/rawdb: implement sequential reads in freezer_table * core/rawdb, ethdb: add sequential reader to db interface * core/rawdb: lint nitpicks * core/rawdb: fix some nitpicks * core/rawdb: fix flaw with deferred reads not being performed * core/rawdb: better documentation * accounts/external: handle 0 chainid as not-set for the Clef API (#23394) * accounts/external: handle 0 chainid as not-set for the Clef API * accounts/external: document SignTx Co-authored-by: Felix Lange <[email protected]> * cmd, metrics: add support for influxdb-v2 (cherry-picking from italoacasas' changes), leave existing support for v1 to maintain backwards-compatibility. (#23194) This PR adds flag to enable InfluxDB v2 (--metrics.influxdbv2), flags for v2-specific features (--metrics.influxdb.token, --metrics.influxdb.bucket), also carries over addition of support for specifying organization (--metrics.influxdb.organization), but still retains backwards compatibility with InfluxDB v1. * eth/downloader: fix typo in comment (#23413) * signer/core/apitypes: remove dependency on internal/ethapi (#23362) * go.mod: upgrade golang.org/x/sys for go1.17 support (#23406) * core/vm: faster code analysis (#23381) * core/vm: more detailed benchmark for jumpdest analysis * core/vm: make jd analysis benchmark alloc free * core/vm: improve jumpdest analysis * core/vm: improve worst-case * core/vm: further improvements in analysis * core/vm: improve jumpdest analysis >PUSH15 * core/vm: make jd analysis ref by value * core/vm: fix misspell * core/vm: improve set8 and set16 a bit * core/vm: reduce amount of code * core/vm: optimize byte copying * params: release Geth v1.10.8 * params: begin Geth v1.10.9 release cycle * trie, les: add missing calls to Ticker.Stop (#23415) * p2p, p2p/enode: fix data races (#23434) In p2p/dial.go, conn.flags was accessed without using sync/atomic. This race is fixed by removing the access. In p2p/enode/iter_test.go, a similar race is resolved by writing the field atomically. Co-authored-by: Felix Lange <[email protected]> * core/bloombits: avoid crash when storing errors of different type (#23437) This fixes a rare crash which could occur when two different errors happened in the same bloombits.MatcherSession. * tests/testdata: make submodule shallow (#23412) Before: 316M .git/modules/tests/ After: 171M .git/modules/tests/ * core/vm: fix typo in comment (#23450) * core/types: add benchmarks for rlp encoding/decoding (#23190) Co-authored-by: Felix Lange <[email protected]> Co-authored-by: Sina Mahmoodi <[email protected]> * node: add comment about --nousb being deprecated (#23439) Co-authored-by: Felix Lange <[email protected]> * tests/fuzzers: fix go vet warning about ReadByte (#23380) * core: make txpool reject too sudden changes (#23095) * core: make txpool reject too sudden changes * core: add some metrics to txpool * cmd/utils: fix typo in variable name (#23451) * metrics: fix compilation for GOOS=js (#23449) * core, light, tests, trie: add state metrics (#23433) * go.mod: update goleveldb (#23417) * build: upgrade to golangci-lint v1.42.0 (#23461) The new linter version is built with go 1.17 and thus includes the go vet check for mismatched +build and go:build lines. Fortunately, no new warnings are reported with this update. * build, .travis.yml: upgrade to Go 1.17 (#23464) * cmd/evm: add difficulty calculation to t8n tool (#23353) This PR adds functionality to the evm t8n to calculate ethash difficulty. If the caller does not provide a currentDifficulty, but instead provides the parentTimestamp (well, semi-optional, will default to 0 if not given), and parentDifficulty, we can calculate it for him. The caller can also provide a parentUncleHash. In most, but not all cases, the parent uncle hash also affects the formula. If no such hash is provided (or, if the empty all-zero hash is provided), it's assumed that there were no uncles. * tests: avoid performance tests during CI runs (#23304) * Dockerfile: upgrade to Go 1.17 (#23465) * crypto/cloudflare/bn256: fix in-place addition and unmarshalling (#23419) * all: add go:build lines (#23468) Generated by go1.17 fmt ./... * rlp: minor optimizations for slice/array encoding (#23467) As per benchmark results below, these changes speed up encoding/decoding of consensus objects a bit. name old time/op new time/op delta EncodeRLP/legacy-header-8 384ns ± 1% 331ns ± 3% -13.83% (p=0.000 n=7+8) EncodeRLP/london-header-8 411ns ± 1% 359ns ± 2% -12.53% (p=0.000 n=8+8) EncodeRLP/receipt-for-storage-8 251ns ± 0% 239ns ± 0% -4.97% (p=0.000 n=8+8) EncodeRLP/receipt-full-8 319ns ± 0% 300ns ± 0% -5.89% (p=0.000 n=8+7) EncodeRLP/legacy-transaction-8 389ns ± 1% 387ns ± 1% ~ (p=0.099 n=8+8) EncodeRLP/access-transaction-8 607ns ± 0% 581ns ± 0% -4.26% (p=0.000 n=8+8) EncodeRLP/1559-transaction-8 627ns ± 0% 606ns ± 1% -3.44% (p=0.000 n=8+8) DecodeRLP/legacy-header-8 831ns ± 1% 813ns ± 1% -2.20% (p=0.000 n=8+8) DecodeRLP/london-header-8 824ns ± 0% 804ns ± 1% -2.44% (p=0.000 n=8+7) * rlp: pass length to byteArrayBytes This makes it possible to inline byteArrayBytes. For arrays, the length is known at encoder construction time, so the call to v.Len() can be avoided. * rlp: avoid IsNil for pointer encoding It's actually cheaper to use Elem first, because it performs less checks on the value. If the pointer was nil, the result of Elem is 'invalid'. * rlp: minor optimizations for slice/array encoding For empty slices/arrays, we can avoid storing a list header entry in the encoder buffer. Also avoid doing the tail check at encoding time because it is already known at encoder construction time. * cmd/devp2p/internal/ethtest: remove WriteTo method (#23379) WriteTo is unused, and go vet warns about it because it doesn't match the usual signature of the io.WriterTo method. * rpc: add BlockNumber.MarshalText (#23324) Currently rpc.BlockNumber is marshalled to JSON as a numeric value, which is wrong because BlockNumber.UnmarshalJSON() wants it to either be hex-encoded or string "earliest"/"latest"/"pending". As a result, the call chain rpc.BlockNumberOrHashWithNumber(123) -> json.Marshal() -> json.Unmarshal() fails with error "cannot unmarshal object into Go value of type string". * build: stop publishing deb packages for Ubuntu 20.10 Groovy Gorilla (#23470) Support for this Ubuntu release has ended on July 22 2021 and Launchpad no longer accepts uploads for it. * internal/ethapi: support both input and data for personal_sendTransaction (#23476) Currently, setDefaults overwrites the transaction input value if only input is provided. This causes personal_sendTransaction to estimate the gas based on a transaction with empty data. eth_estimateGas never calls setDefaults so it was unaffected by this. * core/vm: rework jumpdest analysis benchmarks (#23499) * core/vm: rework jumpdest analysis benchmarks For BenchmarkJumpdestOpAnalysis use fixed code size of ~1.2MB and classic benchmark loop. * core/vm: clear bitvec in jumpdest analysis benchmark * docs: add links to more audits in SECURITY.md (#23482) * core: fix typo in iterator.go (#23502) strorage -> storage * common: fixes format verb (#23495) * cmd/evm: add tests for evm t8n (#23507) * trie: add missing copyright header (#23530) * Add missing copyright header * Update stacktrie_test.go Co-authored-by: Péter Szilágyi <[email protected]> * docs: add post-mortem (#23518) * docs: add post-mortem * Update docs/postmortems/2021-08-22-split-postmortem.md Co-authored-by: Sina Mahmoodi <[email protected]> * Update docs/postmortems/2021-08-22-split-postmortem.md Co-authored-by: Sina Mahmoodi <[email protected]> * Update docs/postmortems/2021-08-22-split-postmortem.md Co-authored-by: Sina Mahmoodi <[email protected]> * Update docs/postmortems/2021-08-22-split-postmortem.md * Update 2021-08-22-split-postmortem.md * Update docs/postmortems/2021-08-22-split-postmortem.md Co-authored-by: Sina Mahmoodi <[email protected]> Co-authored-by: Sina Mahmoodi <[email protected]> * internal/debug: remove deprecated flags (#23368) * internal/debug: remove deprecated flags The removed flags are removed in the main portion of geth, this removes it internally too. * internal/debug: remove legacy --debug and legacy --backtrace flag * Update flags.go Co-authored-by: Martin Holst Swende <[email protected]> * core/rawdb: freezer batch write (#23462) This change is a rewrite of the freezer code. When writing ancient chain data to the freezer, the previous version first encoded each individual item to a temporary buffer, then wrote the buffer. For small item sizes (for example, in the block hash freezer table), this strategy causes a lot of system calls for writing tiny chunks of data. It also allocated a lot of temporary []byte buffers. In the new version, we instead encode multiple items into a re-useable batch buffer, which is then written to the file all at once. This avoids performing a system call for every inserted item. To make the internal batching work, the ancient database API had to be changed. While integrating this new API in BlockChain.InsertReceiptChain, additional optimizations were also added there. Co-authored-by: Felix Lange <[email protected]> * p2p/enode: use unix timestamp as base ENR sequence number (#19903) This PR ensures that wiping all data associated with a node (apart from its nodekey) will not generate already used sequence number for the ENRs, since all remote nodes would reject them until they out-number the previously published largest one. The big complication with this scheme is that every local update to the ENR can potentially bump the sequence number by one. In order to ensure that local updates do not outrun the clock, the sequence number is a millisecond-precision timestamp, and updates are throttled to occur at most once per millisecond. Co-authored-by: Felix Lange <[email protected]> * core: 64bit alignment of testBlockChain.gasLimit (#23543) This fixes crashes in txpool tests on 32bit platforms. * appveyor.yml: add linux/amd64 build job (#23548) * README: add londonBlock to example genesis config (#23565) Updated example genesis.json configuration section, added londonBlock within config. * cmd/evm: transaction validation tool (#23494) * cmd/evm: transaction validation tool * cmd/evm: add hash to t9n tool * cmd/evm: lint nits * cmd/evm: nitpicks * core, rpc: disable memory output by default in traces (#23558) * core: cmd: invert disableMemory * core: fix missed inversion * cmd/evm: preserve Flags but change default value * Apply suggestions from code review Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]> * cmd/devp2p/internal/ethtest: only use eth66 if eth66 is negotiated (#23568) * cmd/devp2p/internal/ethtest: only use eth66 if eth66 is negotiated * cmd/devp2p/internal/ethtest: switch on concrete type not pointer * cmd/devp2p/internal/ethtest: switch on concrete type not pointer * eth/tracers: abort evm execution when trace is aborted (#23580) * core,eth: call frame tracing (#23087) This change introduces 2 new optional methods; `enter()` and `exit()` for js tracers, and makes `step()` optiona. The two new methods are invoked when entering and exiting a call frame (but not invoked for the outermost scope, which has it's own methods). Currently these are the data fields passed to each of them: enter: type (opcode), from, to, input, gas, value exit: output, gasUsed, error The PR also comes with a re-write of the callTracer. As a backup we keep the previous tracing script under the name `callTracerLegacy`. Behaviour of both tracers are equivalent for the most part, although there are some small differences (improvements), where the new tracer is more correct / has more information. * ethclient, accounts/keystore: fix flaky tests (#23599) * ethclient/gethclient: fix flaky test (due to map key ordering) * accounts/keystore: fix test failing due to rand collision due to low time resolution on windows * docs: fix spelling on 2021-08-22 postmortem (#23595) Spelling update * internal: support optional filter expression for debug.stacks (#23605) * internal: support optional filter expression for debug.stacks * internal/debug: fix string regexp * internal/debug: support searching for line numbers too * internal/debug: make gosimple linter happy * go.mod: fix module file to prevent go from updating it during build * console: add note about typing exit to exit (#23602) * add explicit note about typing exit in console * Add note about typing exit as alternative * rpc: set scheme for ws and ipc conns to the server (#23615) * rpc: set scheme for ws and ipc conns to the server * rpc: review fixes * rpc: bugfix * rpc: empty default scheme * accounts/abi: fix resolving single struct argument (#23573) * rpc: set pong read deadline (#23556) This PR adds a 30s timeout for the remote part to answer a ping message, thus detecting (silent) disconnnects * cmd/puppeth: remove shh from Dockerfile (#23634) * eth/tracers: re-write of 4byte tracer using enter/exit (#23622) * eth/tracers: add re-write of 4byte tracer using enter/exit * eth/tracers: fix 4byte indent * eth/tracers: implement debug.intermediateRoots (#23594) This PR implements a new debug method, which I've talked briefly about to some other client developers. It allows the caller to obtain the intermediate state roots for a block (which might be either a canon block or a 'bad' block). * core/rawdb: avoid unnecessary receipt processing for log filtering (#23147) * core/types: rm extranous check in test * core/rawdb: add lightweight types for block logs * core/rawdb,eth: use lightweight accessor for log filtering * core/rawdb: add bench for decoding into rlpLogs * accounts/abi/bind: check event signature before parsing (#23230) * accounts/abi/bind: check event signature before parsing * remove redundant break line * eth/tracers: avoid unsyncronized mutations on trie database (#23632) This PR fixes an issue in traceChain, where the statedb Commit operation was performed asynchronously with dereference-operations agains the underlying trie.Database instance. Due to how the reference counting works within the trie database (where parent count is recursively updated when new parents are added), doing dereferencing in the middle of Commit can cause the refcount to become wrong, leading to an inconsistent state. This was fixed by doing Commit/Deref from the same routine. * eth/protocols/eth: simplify peer known block/txs caches (#23649) * Simplify peer known block/txns cache * Address minor changes * Add more minor comments * Minor changes from review * graphql: add storage slots to access list (#23650) Fixes #23640 * eth/protocols/snap, trie: better error-handling (#23657) * params: release go-ethereum v1.10.9 stable * params: begin v1.10.10 release cycle * core: fix typo in comment (#23658) * internal/ethapi: support retrieving header RLPs too * eth/tracers: fix callTracer fault handling (#23667) * eth/tracers: fix calltracer fault handling * eth/tracers: fix calltracer indentation * internal/ethapi: make header/block rlp retrieval canonical * core/state: fix typo in comment (#23665) * eth/filters: fix TestPendingLogsSubscription (#23619) The test did not synchronize with per-case goroutines, and thus didn't notice that some tests were just hanging. This change adds missing synchronization and fixes the broken tests. * eth/protocols/eth: replace array with counter in txn broadcaster (#23656) * eth/api: add rpc method to obtain which states are accessible (#23646) This PR adds a method to the debug namespace, to iterate over the blocks and check where we have the roots on disk. * go.mod: upgrade github.com/karalable/usb (#23684) This update includes fixes for the *BSD build and go module vendoring. * cmd, core, eth, miner: deprecate miner.gastarget flag (#23213) * params: update CHTs for the 1.10.7 release * eth: drop eth/65, the last non-reqid protocol version * tests: update, enable legacy tests, remove vm tests (#23350) * tests: update, enable legacy tests, remove vm tests * tests: minor fixes * cmd, core: remove calaveras testnet (#23366) Removes references to the short-lived Calaveras testnet * cmd/utils: add --nousb to the list of deprecated flags (#23388) Adds --nousb as a deprecated flag when someone runs the geth show-deprecated-flags command. * Revert "eth: drop eth/65, the last non-reqid protocol version" (#23426) * core: only check sendernoeoa in non fake mode (#23424) * eth/gasprice: feeHistory improvements (#23422) * eth/gasprice: cache feeHistory results * eth/gasprice: changed feeHistory block count limitation * eth/gasprice: do not use embedded struct in blockFees * eth/gasprice: fee processing logic cleanup * eth/gasprice: purge feeHistory cache at chain reorgs * Revert "Revert "eth: drop eth/65, the last non-reqid protocol version" (#23426)" (#23456) This reverts commit c368f728c19e7fd7a9613513edda68ffcb503af0. * node: remove dependency on wallet backend packages (#23019) * accounts: new AddBackends method in manager * node,cmd/geth: mv accman backend init to cmd/geth * node,cmd/geth: mv scrypt config downstreawm from node * accounts: use static buffer size for accman sub chan minor fix * accounts,cmd/geth: update accman backends through its event loop * accounts,node: add comments * accounts: un-export newBackendEvent * accounts: use chan instead of wg in newBlockEvent * node: rename isKeyDirEphem * accounts,cmd: AddBackends->AddBackend * accounts: fix potential blocking when adding backend * Revert "eth, internal/ethapi: make RPC block miner field show block sealer correctly (#23312)" (#23466) This reverts commit 57feabea663496109e59df669238398239438fb1. * core: fix race conditions in txpool (#23474) * core: fix race conditions in txpool * core: fixed races in the txpool * core: rebased on master * core: move reheap mutex * core: renamed mutex * core: revert Reheap changes * cmd/geth, cmd/utils: remove legacy rpc flags (#23358) * remove rpc flags * remove legacy rpc flags * remove legacy rpc flags * remove legacy rpc commands * (hopefully) fix most of the build errors * fix build errors https://app.travis-ci.com/github/ethereum/go-ethereum/jobs/530318686 * cmd/utils: fix syntax error * empty commit to unbreak travis ci * fix syntax error * syntax fixes * syntax fixes * fix fixes "cmd/geth/usage.go:234:7: expected '(', found init (typecheck)" * fix * various fixes in usage.go * various fixes in flags.go * adds extra space reverts the spacing to how it was before I resolved the merge conflict * more fixes in usage.go * fix fix for cmd/geth/usage.go:243:17: expected operand, found ':=' (typecheck) in travis * Update cmd/utils/flags.go Co-authored-by: Martin Holst Swende <[email protected]> * fix error fixes these errors: cmd/utils/flags_legacy.go:21:2: "strings" imported but not used (typecheck) "strings" ^ cmd/utils/flags_legacy.go:24:2: "github.com/ethereum/go-ethereum/node" imported but not used (typecheck) "github.com/ethereum/go-ethereum/node" ^ * goimports Co-authored-by: Martin Holst Swende <[email protected]> * core: make txPricedList.stales the first field for 64bit alignment (#23542) This fixes crashes on 32bit builds. * consensus/clique: prevent 0 len extradata from panicing (#23538) Closes #23522 Co-authored-by: Martin Holst Swende <[email protected]> * eth, internal/ethapi: make RPC block miner field show block sealer correctly (#23312) Makes the RPC block return the POA sealer for clique blocks on the 'miner' field (was previously zeroes) * eth, internal/ethapi: make RPC block miner field show block sealer correctly (#23312) Makes the RPC block return the POA sealer for clique blocks on the 'miner' field (was previously zeroes) * core: only check sendernoeoa in non fake mode (#23424) * les: fix data races in tests (#23457) * Revert "eth, internal/ethapi: make RPC block miner field show block sealer correctly (#23312)" (#23466) This reverts commit 57feabea663496109e59df669238398239438fb1. * les: duplicate downloader and fetcher to allow progressive refactoring * core/state: move state account to core/types + abstracted "write account to trie" (#23567) * core/state: abstracted "write account to trie" method * fix appveyor build * Apply suggestions from code review Co-authored-by: Martin Holst Swende <[email protected]> * review feedback * core/state/accounts: move Account to core/types * core/types: rename Account -> StateAccount * core/state: restore EncodeRLP for stateObject * core/types: add the missing file * more review feedback * more review feedback Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: Felix Lange <[email protected]> * internal/ethapi: support retrieving header RLPs too * internal/ethapi: support retrieving header RLPs too * internal/ethapi: make header/block rlp retrieval canonical * core/types: copy tx recipient address (#23376) This resolves a long-standing TODO. The point of copying the address is to ensure that all data referenced by types.Transaction is independent of the data passed into the constructor. Co-authored-by: Felix Lange <[email protected]> * Updated eth_upstream Co-authored-by: Felföldi Zsolt <[email protected]> Co-authored-by: Péter Szilágyi <[email protected]> Co-authored-by: Zachinquarantine <[email protected]> Co-authored-by: Ziyuan Zhong <[email protected]> Co-authored-by: Tyler Chambers <[email protected]> Co-authored-by: Tyler Chambers <[email protected]> Co-authored-by: Felix Lange <[email protected]> Co-authored-by: lightclient <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: jwasinger <[email protected]> Co-authored-by: chuwt <[email protected]> Co-authored-by: ucwong <[email protected]> Co-authored-by: Marius van der Wijden <[email protected]> Co-authored-by: Pedro Gomes <[email protected]> Co-authored-by: ligi <[email protected]> Co-authored-by: Guillaume Ballet <[email protected]> Co-authored-by: Sina Mahmoodi <[email protected]> Co-authored-by: baptiste-b-pegasys <[email protected]> Co-authored-by: Ivan Bogatyy <[email protected]> Co-authored-by: gary rong <[email protected]> Co-authored-by: Dmitry Zenovich <[email protected]> Co-authored-by: Paweł Bylica <[email protected]> Co-authored-by: Fredrik Svantes <[email protected]> Co-authored-by: Ikko Ashimine <[email protected]> Co-authored-by: Alexander Yastrebov <[email protected]> Co-authored-by: aaronbuchwald <[email protected]> Co-authored-by: Jonathan Verhees <[email protected]> Co-authored-by: Pete <[email protected]> Co-authored-by: Thad Guidry <[email protected]> Co-authored-by: Jordan Krage <[email protected]> Co-authored-by: Zachinquarantine <[email protected]> Co-authored-by: Yihau Chen <[email protected]> Co-authored-by: Ferran Borreguero <[email protected]> Co-authored-by: hsyodyssey <[email protected]> Co-authored-by: Miro <[email protected]> Co-authored-by: 陈佳 <[email protected]>
- Loading branch information