Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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) * 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/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 <peterke@gmail.com> * docs: add post-mortem (#23518) * docs: add post-mortem * Update docs/postmortems/2021-08-22-split-postmortem.md Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> * Update docs/postmortems/2021-08-22-split-postmortem.md Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> * Update docs/postmortems/2021-08-22-split-postmortem.md Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> * 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 <1591639+s1na@users.noreply.github.com> Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> * 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 <martin@swende.se> * 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 <martin@swende.se> * 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 <martin@swende.se> * 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 <fjl@twurst.com> * 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 <fjl@twurst.com> * core: make txPricedList.stales the first field for 64bit alignment (#23542) This fixes crashes on 32bit builds. * core: 64bit alignment of testBlockChain.gasLimit (#23543) This fixes crashes in txpool tests on 32bit platforms. * appveyor.yml: add linux/amd64 build job (#23548) * les: duplicate downloader and fetcher to allow progressive refactoring * 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 <martin@swende.se> Co-authored-by: Martin Holst Swende <martin@swende.se> * 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 * consensus/clique: prevent 0 len extradata from panicing (#23538) Closes #23522 Co-authored-by: Martin Holst Swende <martin@swende.se> * 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 * 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 <martin@swende.se> * 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 <martin@swende.se> Co-authored-by: Felix Lange <fjl@twurst.com> * 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. * 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 <fjl@twurst.com> * core: improve shutdown synchronization in BlockChain (#22853) This change removes misuses of sync.WaitGroup in BlockChain. Before this change, block insertion modified the WaitGroup counter in order to ensure that Stop would wait for pending operations to complete. This was racy and could even lead to crashes if Stop was called at an unfortunate time. The issue is resolved by adding a specialized 'closable' mutex, which prevents chain modifications after stopping while also synchronizing writers with each other. Co-authored-by: Felix Lange <fjl@twurst.com> * internal/ethapi: use correct signer when serving old blocks (#23683) Fixes #23681 After the fix I get the address 0x6d6d02e83c4ced98204e20126acf27e9d87b8af2 for the tx mentioned in the ticket, which agrees with etherscan. * cmd/geth: fix typo in error message (#23697) * build: upgrade -dlgo version to 1.17.2 (#23698) Go 1.17.2 fixes some miscompilation issues on amd64 and a runtime issue with timers. While the upgrade is not strictly necessary for go-ethereum right now, it is still good to be up-to-date. * eth: close miner on exit (instead of just stopping) (#21992) This ensures that all miner goroutines have exited before stopping the blockchain. Co-authored-by: Felix Lange <fjl@twurst.com> * miner: fix data race during shutdown (#23435) This fixes a data race on worker.current by moving the call to StopPrefetcher into the main loop. The commit also contains fixes for two other races in unit tests of unrelated packages. * miner/stress: initialize account backends explicitly (#23699) node.Node no longer registers any account manager backends by default, they need to be registered explicitly. For ethash-based tests, we actually don't need any accounts in the miner keystore. Just set the etherbase instead to make mining work. For clique, the signer account must be in the keystore. The change also adds interrupt handling in stress tests. * internal/jsre: handle null and undefined to prevent crash (#23701) This prevents the console from crashing when auto-completing on a variable or property that is null or undefined. Fixes #23693 * core/state: fix typos in comments (#23702) * eth/gasprice: avoid modifying TestChainConfig (#23204) Co-authored-by: Felix Lange <fjl@twurst.com> * cmd/puppeth: add txpool to explorer Dockerfile (#23652) * cmd/evm: stricter transaction validation (#23694) * cmd/evm: t9n: validate transaction intrinsic gas * cmd/evm: t9n: stricter tx validation * build: increase C thread stack size on linux (#23676) * build: increase thread stack size when running alpine linux * review feedback: force a stack size of 8M on all linux distribs * fix missing extldflags * params: changed CatalystBlock to TerminalTotalDifficulty (#23700) * params: changed CatalystBlock to TerminalTotalDifficulty * eth/catalyst: comment out unused code * les/vflux/server: fix metrics (#22946) * les/vflux/server: fix metrics * les/vflux/server: fix metrics * core: tests for forked blocks retrievable by hash (#23695) * Update tests to showcase that forked blocks can still be looked up by their hash * ci: enable race tests as cron job on travis (#23480) * consensus/clique, core: API cleanup (#23100) This removes some code: - The clique engine calculated the snapshot twice when verifying headers/blocks. - The method GetBlockHashesFromHash in Header/Block/Lightchain was only used by tests. It is now removed from the API. - The method GetTdByHash internally looked up the number before calling GetTd(hash, num). In many cases, callers already had the number, and used this method just because it has a shorter name. I have removed the method to make the API surface smaller. * fixed broken web3 methods link in README.md (#23703) * eth,rpc: allow for flag configured timeouts for eth_call (#23645) * eth,rpc: allow for flag configured timeouts for eth_call * lint: account for package-local import order * cr: rename `rpc.calltimeout` to `rpc.evmtimeout` * go.mod: upgrade goja (#23721) This update adds support for some more ES6 functionality, notably arrow functions. * core/types: add MarshalBinary, UnmarshalBinary for Receipt (#22806) * all: fix some go-critic linter warnings (#23709) This doesn't fix all go-critic warnings, just the most serious ones. Co-authored-by: Felix Lange <fjl@twurst.com> Co-authored-by: Martin Holst Swende <martin@swende.se> * accounts/abi/bind: refactor transact method (#23719) This fixes a bug where gas-related fields of the TransactOpts passed to transaction methods would be modified, skipping gas estimation for subsequent transactions. Co-authored-by: Yondon Fu <yondon.fu@gmail.com> Co-authored-by: Felix Lange <fjl@twurst.com> * core: remove unused error from TxPool.Pending (#23720) * accounts/abi: add basic support for error types (#23161) This is the initial step for support of Solidity errors in contract bindings. As of this change, errors can be decoded, but are not supported in bindings yet. Closes #23157 * core/state/snapshot: fix data race in layer flattening (#23628) * core/state/snapshot: fix data race in layer flattening * core/state/snapshot: fix typo * params: release go-ethereum v1.10.10 stable * Apply best practices to Dockerfile * Vendor protobuf and go extension issue PR (maticnetwork#223) * Vendor protobuf and go extension issue PR * Finalized the script * Quick fix * Final touches to Dockerfiles * Build the new CLI * Bump Go * Revert "Build the new CLI" This reverts commit e58bdfa. * Add chain set head command (maticnetwork#226) * Added Prometheus flag on bor-cli * Release multi-platform with goreleaser Packages, docker images CI automated * Added Prometheus to New CLI: fixes * minor Clean * Minor Clean-up * minor cleanup * Added Prometheus Flag and Default * added opentelemetry config, flags, and setup (maticnetwork#235) * added opentelemetry config, flags, and setup * modifications in opencollector flag and config * bug fix * modified error log * Adapt Dockerfile for development (maticnetwork#237) * Adapt Dockerfile for development The Dockerfile for release using Alpine is in the included Dockerfile.release and this one was not used for release so doesn't make sense to have it using multistage nor Alpine. * added service name in config and flags (maticnetwork#238) * fix: bor receipt #1 * Write bor receipts in ancient * fix: bor receipt rlp * fix: testcases * Arpit/reorg fix 2 (maticnetwork#210) * testing * author check * if else fix * Small tweeks to Dockerfiles (maticnetwork#247) Standardize Dockerfile between projects (Heimdall) and remove not necessary tini package. * Fix ancient receipts * Fix ancestor bor receipts (maticnetwork#249) * bumped version to 0.2.11 * Changed syncmode from fast to full * Genesis change fix (maticnetwork#252) * read from genesis file * add: set code in finalize and assemble * new: storing data in bor config * chg: remove unwanted code * chg: refactor * minor change * add error states * Fix small things * Add test * Add more coverage in genesis finalize test * Ensure balance is not changed * Add decode safe check * Change bor config block alloc field name * Remove block alloc values in blocks * Add genesis alloc code change info logging Co-authored-by: Ferran Borreguero <ferranbt@protonmail.com> * add block alloc * change block alloc * remove byte array * mainnet upgrade Co-authored-by: Paweł Bylica <chfast@gmail.com> Co-authored-by: Fredrik Svantes <fredrik@ethereum.org> Co-authored-by: Ikko Ashimine <eltociear@gmail.com> Co-authored-by: Alexander Yastrebov <yastrebov.alex@gmail.com> Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> Co-authored-by: Martin Holst Swende <martin@swende.se> Co-authored-by: aaronbuchwald <aaron.buchwald56@gmail.com> Co-authored-by: Péter Szilágyi <peterke@gmail.com> Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> Co-authored-by: Zachinquarantine <zachinquarantine@yahoo.com> Co-authored-by: Felix Lange <fjl@twurst.com> Co-authored-by: Jonathan Verhees <jonathan@verhe.es> Co-authored-by: Pete <90942436+peteyburgers@users.noreply.github.com> Co-authored-by: Thad Guidry <thadguidry@gmail.com> Co-authored-by: gary rong <garyrong0905@gmail.com> Co-authored-by: Jordan Krage <jmank88@gmail.com> Co-authored-by: Zachinquarantine <Zachinquarantine@protonmail.com> Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Co-authored-by: Yihau Chen <a122092487@gmail.com> Co-authored-by: Ferran Borreguero <ferranbt@protonmail.com> Co-authored-by: hsyodyssey <47173566+hsyodyssey@users.noreply.github.com> Co-authored-by: Miro <mirokuratczyk@users.noreply.github.com> Co-authored-by: Sean <darcys22@gmail.com> Co-authored-by: Aditya Arora <arora.aditya520@gmail.com> Co-authored-by: z89 <30657227+z89@users.noreply.github.com> Co-authored-by: noam-alchemy <76969113+noam-alchemy@users.noreply.github.com> Co-authored-by: Ian Norden <iannordenn@gmail.com> Co-authored-by: Iskander (Alex) Sharipov <i.sharipov@corp.vk.com> Co-authored-by: Yondon Fu <yondon.fu@gmail.com> Co-authored-by: jwasinger <j-wasinger@hotmail.com> Co-authored-by: Victor Castell <victor@victorcastell.com> Co-authored-by: Rajat Saxena <42701222+rajatlko13@users.noreply.github.com> Co-authored-by: Victor Castell <victor@polygon.technology> Co-authored-by: Shivam Sharma <shivam691999@gmail.com> Co-authored-by: Manav Darji <manavdarji.india@gmail.com> Co-authored-by: Sandeep Sreenath <sandeep.sreenath@gmail.com> Co-authored-by: Jaynti Kanani <jdkanani@gmail.com> Co-authored-by: Arpit Temani <temaniarpit27@gmail.com> Co-authored-by: Sandeep Sreenath <ssandeep@users.noreply.github.com>
- Loading branch information