-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge upstream 1.9.11 #1209
Merge upstream 1.9.11 #1209
Conversation
* log: delete RotatingFileHandler We added this for the dashboard, which is gone now. The handler never really worked well and had data race and file handling issues. * internal/debug: remove unused RotatingFileHandler setup code
* abidump: implement abi dump command * cmd/abidump: add license
This replaces the JavaScript interpreter used by the console with goja, which is actively maintained and a lot faster than otto. Clef still uses otto and eth/tracers still uses duktape, so we are currently dependent on three different JS interpreters. We're looking to replace the remaining uses of otto soon though.
This change makes the client attempt to reconnect when a write fails. We already had reconnect support, but the reconnect would previously happen on the next call after an error. Being more eager leads to a smoother experience overall.
Fixes #20467 Co-authored-by: meowsbits <[email protected]>
* signer: replace otto with goja * go.mod: remove Otto
* trie: make db insert use size instead of full data * core/state: minor optimization in state onleaf allocation * trie: implement dedicated committer and hasher * trie: use dedicated committer/hasher * trie: linter nitpicks * core/state, trie: avoid unnecessary storage trie load+commit * trie: review feedback, mainly docs + minor changes * trie: start deprecating old hasher * trie: fix misspell+lint * trie: deprecate hasher.go, make proof framework use new hasher * trie: rename pure_committer/hasher to committer/hasher * trie, core/state: fix review concerns * trie: more review concerns * trie: make commit collapse into hashnode, don't touch dirtyness * trie: goimports fixes * trie: remove panics
* add regression tests for #20611 * eth/tracers: fix panics occurring for invalid params in js-tracers Co-authored-by: Martin Holst Swende <[email protected]>
* core/vm/runtime: add test for blockhash * core/evm: less iteration in blockhash * core/vm/runtime: nitpickfix Co-authored-by: Péter Szilágyi <[email protected]>
Adds the 'geth dumpgenesis' command, which writes the configured genesis in JSON format to stdout. This provides a way to generate the data (structure and content) that can then be used with the 'geth init' command.
* trie: make hasher parallel when number of changes are large * trie: remove unused field dirtyCount * trie: rename unhashedCount/unhashed
For longer records and subtree entries, the deployer created two separate TXT records. This doesn't work as intended because the client will receive the two records in arbitrary order. The fix is to encode longer values as "string1""string2" instead of "string1", "string2". This encoding creates a single record on AWS Route53.
The feature update allows the GraphQL API endpoint to retrieve transaction signature R,S,V parameters. Co-authored-by: amitshah <[email protected]> Co-authored-by: Felix Lange <[email protected]>
These methods can be helpful when migrating existing timer code.
Co-authored-by: ligi <[email protected]>
With this commit, tests TestSendTransactions63 and TestSendTransactions64 are failing, but that is also the case upstream and fixed in a later commit in the same patch version (9938d95) Conflicts: eth/downloader/peer.go eth/fetcher/block_fetcher.go eth/handler.go eth/handler_test.go eth/helper_test.go eth/peer.go eth/protocol.go eth/protocol_test.go eth/sync_test.go
Used strategy 'ours' since this has already been done on master.
Conflicts: eth/fetcher/tx_fetcher_test.go eth/handler.go eth/metrics.go eth/peer.go eth/sync.go
The indexes used in these tests are fixed according to the deterministic random shuffles done (only for the tests) by TxFetcher. Since Celo transactions have additional fields, their hashes are different, leading to different orderings before and after the shuffle, so the indexes had to be updated to match the tests' intents.
Conflicts: cmd/utils/flags.go eth/config.go eth/gen_config.go node/service.go params/bootnodes.go
The removed code included updating the ingressConnectWithHandshakeMeter and egressConnectWithHandshakeMeter metrics. This will be fixed in a separate commit to make it explicit that it was a fix necessitated by the merge. Conflicts: p2p/metrics.go
Conflicts: params/config.go
Conflicts: params/version.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
One minor issue... i suspect that geth dumpgenesis
won't work for us, at least istanbul config things might be missing. We should check if this is the case. If it is i'm fine with just creating an issue to fix it, and merge anyway
Conflicts: .travis.yml appveyor.yml build/checksums.txt
I confirmed that dumpgenesis includes the |
Description
Merge was done in several steps, to avoid overwhelming merge conflicts. Some notes about individual merge commits are below.
Besides that, the main thing that bears mentioning is the introduction of DNS-based discovery (was already mostly ready but unused in the code, but finalized and enabled by default here). It is used for eth/istanbul only (not for LES), through
proto.DialCandidates
, which is then added as a source to p2pserver'sdiscmix
iterator. If we wanted to start using it ourselves, we should be able to, following the instructions at https://geth.ethereum.org/docs/developers/dns-discovery-setup. The only difference I'm aware of is that we'd need to include the right networkid (for mainnet, alfajores, or baklava) when running thecrawl
subcommand. I triedcrawl
out, and it currently doesn't work due to a problem with the networkid flag, so I opened a separate PR to fix that issue, #1212, since the affected code is already on master and not really part of this merge PR.dcffb77
dummyChain
incore/vm/runtime/runtime_test.go
needed additional methods to satisfy theChainContext
interface, so I added them even though we also have amockBlockchain
type in istanbul test files058a4ac
improved the performance ofGetHashFn()
incore/evm.go
. In celo-blockchain, that file no longer exists, and that function has been moved tocore/vm/runtime/runtime.go
, so I updated that to the improved version.049e171
(eth/65)eth/protocol.go
, I instead made the corresponding changes toconsensus/istanbul/protocol.go
. In a later separate commit, I add a comment clarifying that Celo66 corresponds to eth/65eth/protocol_test.go
, they did not update the protocol version used forTestForkIDSplit
. This doesn't matter, since since the protocol change has nothing to do with that, but seemed like a good idea to have it use the newest version, so I updated it to 66TestSendTransactions63
andTestSendTransactions64
fail. This is also the case upstream, and is fixed in a later commit that was part of the same upstream PR (9938d95
, Feb 13, 2020)90caa2c
(new dial scheduler)--ours
merge strategy (after merging in from celo-blockchain master), since this is already on master from having been cherry picked9938d95
(second part of eth/65)eth/
, namely the fileseth/metrics.go
andeth/fetcher/metrics.go
. Removingeth/metrics.go
had conflicts with ours, but they just had to do with how we renamed eth to istanbul and the versions, so not relevant to the fact that the file was deleted. The rationale for this removal can be seen on the upstream PR: core, eth: announce based transaction propagation ethereum/go-ethereum#20234 (comment) ("Removed the metrics from the eth package as all network packets are already covered by p2p generically, so it's better not to have to maintain this code."). None of the metrics removed or renamed are among the ones we list in our docs (https://docs.celo.org/validator-guide/monitoring#metrics)celo-blockchain/eth/metrics.go
Lines 24 to 57 in 011f74f
celo-blockchain/eth/fetcher/metrics.go
Lines 25 to 43 in 011f74f
celo-blockchain/eth/fetcher/block_fetcher.go
Lines 46 to 64 in ba75a9a
celo-blockchain/eth/fetcher/tx_fetcher.go
Lines 70 to 97 in ba75a9a
txsyncLoop64
andSendTransactions64
. Did not rename them to match the istanbul version numbers instead, but in comments which mention eth/6x I mentioned which celo/6x they correspond to. In the test code there are many to test with several protocol versions. For those, I did update it, since there the function name is paired with a protocol number that's given as an argument to a generic test function, and so it'd be odd to have a mismatch.26284ec
circleci/golang:1.13
(1.13.15) for the build, for the e2e tests we usecelohq/node10-gcloud:v3
withGO_VERSION=1.13.7
, and in our Dockerfile we usegolang:1.13-alpine
(1.13.15). Open question: should we update GO_VERSION for the e2e tests to 1.13.15? Any reason not to?cmd/utils/flags.go
, at the end ofSetEthConfig
, there is a check fornetworkId == 1
(ethereum mainnet). I changed this to== params.MainnetNetworkId
.ac72787
:p2p/metrics.go
. I made sure to preserve the metrics we've added in that file, listed below. Of these, the two handshake metrics were being updated inhandshakeDone()
, which no longer exists. Instead, in a separate commit, I made it update themp2p/server.go
, wherehandshakeDone()
was being called from. Our added metrics:handshakeDone()
and themeteredPeerCount
counter, which suffered from a race condition that led to p2p.Server connections not being tracked properly #1172. As a result, when this PR is merged we can close that issue.Tested
Automated tests pass, but some are flaky. Will look into them to see whether or not it may be anything specific to this PR and whether they also happen on upstream 1.9.11.
Related issues
Backwards compatibility
No breaking changes either at the protocol level or at the local use level.
Reference links
1.9.11 release notes: https://github.com/ethereum/go-ethereum/releases/tag/v1.9.11
1.9.11 PRs: https://github.com/ethereum/go-ethereum/milestone/97?closed=1
1.9.11 commits: https://github.com/ethereum/go-ethereum/commits/master?before=6a62fe399b68ab9e3625ef5e7900394f389adc3a+35&branch=master