-
Notifications
You must be signed in to change notification settings - Fork 222
Upstream merge up to 1.9.25 #1671
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
Conversation
build: drop disco, enable groovy on Ubuntu PPAs
* t8ntool: add output basedir * t8ntool: add txhash to trace filename * t8ntool: don't default to '.' basedir, allow absolute paths
* core: define and test chain reparation cornercases * core: write up a variety of set-head tests * core, eth: unify chain rollbacks, handle all the cases * core: make linter smile * core: remove commented out legacy code * core, eth/downloader: fix review comments * core: revert a removed recovery mechanism
travis, dockerfile, appveyor, build: bump to Go 1.15
* metrics: zero temp variable in updateMeter Previously the temp variable was not updated properly after summing it to count. This meant we had astronomically high metrics, now we zero out the temp whenever we sum it onto the snapshot count * metrics: move temp variable to be aligned, unit tests Moves the temp variable in MeterSnapshot to be 64-bit aligned because of the atomic bug. Adds a unit test, that catches the previous bug.
eth/downloader: fix rollback issue on short chains
* eth/downloader, eth/handler: utilize sync bloom for getNodeData * trie: handle if bloom is nil * trie, downloader: check bloom nilness externally
core/state/snapshot: reduce disk layer depth during generation
…pty (#21396) This change improves discovery behavior in small networks. Very small networks would often fail to bootstrap because all member nodes were dropping table content due to findnode failure. The check is now changed to avoid dropping nodes on findnode failure when their bucket is almost empty. It also relaxes the liveness check requirement for FINDNODE/v4 response nodes, returning unverified nodes as results when there aren't any verified nodes yet. The "findnode failed" log now reports whether the node was dropped instead of the number of results. The value of the "results" was always zero by definition. Co-authored-by: Felix Lange <[email protected]>
core/rawdb: only complain loudly if truncating many items
params: update CHTs for v1.9.20 release
…(#21334) * accounts/abi/bind/backends: Disallow timeshift for non-empty blocks * accounts/abi/bind/backends: added tests for adjust time * accounts/abi/bind/simulated: added comments, fixed test for AdjustTime * accounts/abi/bind/backends: updated comment
* go.mod | goleveldb latest update * go.mod update * leveldb options * go.mod: double check Co-authored-by: Péter Szilágyi <[email protected]>
core/state, eth, trie: stabilize memory use, fix memory leak
… calls (#21387) * tests: add testdata of call tracer * eth/tracers: return revert reason in call_tracer * eth/tracers: regenerate assets * eth/tracers: add error message even if no exec occurrs, fixes #21438 Co-authored-by: Martin Holst Swende <[email protected]>
# Conflicts: # core/genesis.go # scripts/check_imports.sh # scripts/hooks/pre-commit
8fa236f to
053e887
Compare
|
Hi @gastonponti I've had a look through and here are my thoughts so far. I'm currently looking at syncWithPeer, but that will take a while.
leaving startCh as struct{}{} means that there is a data race that could occur when accessing the validator addresses (because the values are set from one go routine and accesse from another with no synchronisation). I would suggest removing the validator field in miner (because its also set in the worker) and then adding a read locked method to access the validator address from the worker. Why are we not supporting the ephemeral chain?
I'm not really understanding the significance of the above change? |
|
With regards to the pivot selection I think there could be a problem. I think pruning was introduced in this PR:
Then there was this PR:
|
…-1.9.25 # Conflicts: # internal/ethapi/api.go # les/client_handler.go
|
Coverage from tests in coverage: 44.5% of statements across all listed packagescoverage: 54.1% of statements in consensus/istanbul coverage: 45.0% of statements in consensus/istanbul/backend coverage: 0.0% of statements in consensus/istanbul/backend/backendtest coverage: 43.3% of statements in consensus/istanbul/backend/internal/db coverage: 24.1% of statements in consensus/istanbul/backend/internal/enodes coverage: 22.4% of statements in consensus/istanbul/backend/internal/replica coverage: 63.3% of statements in consensus/istanbul/core coverage: 0.0% of statements in consensus/istanbul/proxy coverage: 75.3% of statements in consensus/istanbul/uptime coverage: 100.0% of statements in consensus/istanbul/uptime/store coverage: 51.8% of statements in consensus/istanbul/validator coverage: 79.2% of statements in consensus/istanbul/validator/randomCommentID: 0adf78fd58 |
|
@gastonponti could you check that all changes to the |
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.
Leaving some comments while i'm doing the rest of the review
| - go run build/ci.go install -arch 386 | ||
| - go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds | ||
| - go run build/ci.go install -dlgo | ||
| - go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds |
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.
SIGNIFY_KEY is a variable name or a value? If a variable, where is it defined?
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.
It's an environment variable
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.
It's used by the archive command of the build/ci.go
| break | ||
| } | ||
| // If the next account is empty, stop self-derivation, but add for the last base path | ||
| // We've just self-derived a new account, start tracking it locally |
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.
is usb wallet ledger? does this impact it in any way?
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.
They basically missed the base derivation path, and they had to change m/44'/60'/0'/0 to m/44'/60'/0'/0/0.
For geth, they log the accounts legacy that they are not discovering (this is of course the case where the user is not specifying the path). For clef they are getting the first 5 of the legacy and 5 from the normal one.
We have the same legacy/normal path specification in the accounts/hd.go
What it seems, is that when we build/change our hw in celo, we added that differentiation. So, in our case, probably all the accounts were built using the new path, so if it's selecting legacy accounts just to log them as an error, we shouldn't have any.
TL;DR; won't impact, just log something that we probably avoided
| "testing" | ||
| ) | ||
|
|
||
| func TestVerification(t *testing.T) { |
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.
does this work? is it tied to geth or celo blockchain versions?
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.
Tied to geth. Added the issue #1728
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.
Can't say that my review is any guarantee here. Too many lines of code, don't really know the context of many of them. But didn't find any red alerts. if e2e tests are good, and it's syncing. I would merge this
|
|
||
| var ( | ||
| EmptyRootHash = DeriveSha(Transactions{}) | ||
| EmptyRootHash = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") |
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.
where does this come from?
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.
56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421 is the empty root. Check this similar one. ethereum/go-ethereum#19254
If you check the codebase, that emptyRootHash is al over the place
|
Just to add context in the PR for an offline discussion, the comment #1671 (comment) was dismissed, because the moving pivot requiring less that 127 blocks, is needed for the snap sync, which we have disabled. We of course, will need to fix this, but to achieve this, we should (and will) need to change how we are calculating the uptimeScore of every validator in the the middle of an epoch. Right now, as we are only calculating the uptimeScore when we are inserting a block, we changed the fast sync, to use the block of the actual epoch change as the pivot block. This way, the fast sync uses headers until the beginning of the epoch, and then, just sync inserting blocks. This calculates the uptimeScore with the block insertion. In the scenario of not having more of 127 blocks, will break how we calculate the uptimeScore, and that's why we need to change that. |
2361d42 to
e70b7d5
Compare
e70b7d5 to
89d34bb
Compare
Description
Merge from upstream, go-ethereum v1.9.25
Versions
Geth v1.9.20 is another maintenance release containing bug fixes and security enhancements. This update is recommended for all users. Please note that reverting to Geth v1.9.19 or prior after upgrading to v1.9.20 is not possible without a resync because the blockchain database layout has changed.
(https://github.com/ethereum/go-ethereum/releases/tag/v1.9.20)
Geth v1.9.21 is a regular maintenance release, the highlights being the removal of whisper, better call tracing and multiple memory stability fixes during fast sync to both stabilize usage as well as to fix a memory leak that lead to crashers before.
(https://github.com/ethereum/go-ethereum/releases/tag/v1.9.21)
Geth v1.9.22 is our usual maintenance release, fixing a few bugs and adding some minor features
(https://github.com/ethereum/go-ethereum/releases/tag/v1.9.22)
Geth v1.9.23 is a maintenance release containing security fixes. This update is recommended for all users.
(https://github.com/ethereum/go-ethereum/releases/tag/v1.9.23)
Geth v1.9.24 is a security release. It is built with Go v1.15.5, fixing CVE-2020-28362, which has a critical impact for Ethereum (already fixed in Celo). This release also contains a fix for a consensus issue related to mining, which would have triggered a chain split on January 1st 2021.
(https://github.com/ethereum/go-ethereum/releases/tag/v1.9.24)
Geth v1.9.25 is a maintenance release.
(https://github.com/ethereum/go-ethereum/releases/tag/v1.9.25)
Merge Notes
Commit:
e7872729012a4871397307b12cc3f4772ffcbec6Removed
p2p/discover/v5_encoding.gomobile/shhclient.goles/balance.goMerge Decisions
miner/miner.go:startChleave it asstruct{}{}(the miner data is set in the Start)cmd/utils/flags.goremove new flag GpoMaxGasPriceFlagconsolecmd_test.goadded"--light.maxpeers", "0"flag to the runMinimalGeth functioncore/vm/contracts.gocore/vm/evm.gocore/vm/runtime/runtime.gocore/state_processor.gocore/headerchain.goeth/downloader/downloader.go->
This pivot part should be checked, because the functionality of moving the pivot while syncing, is using a max of 64 blocks in ethereum, but as we require the epoch to calculate the uptime score, some of the changes in the pivot, should be forced to the epoch block
Tested
An explanation of how the changes were tested or an explanation as to why they don't need to be.
Related issues
Backwards compatibility
Brief explanation of why these changes are/are not backwards compatible.