This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 165
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
solution: if block number is lower than local with same td, use it otherwise ok to flip coin if same
solution: use 'bc' instead of 'self'
This reverts commit cd659dd.
NOTE: bc.HasHeader, bc.GetHeader, ... etc funcs SHOULD use hash, uint64 signature b/c more safer. HOWEVER, I just made the incoming implementation use hash because it was easier and fast and a POC, so far.
solution: fix interfaces and adapt to compromise between incoming and existing patterns
via karalabe's un-cherry-pickable 4cf1ece5ba7c28e9ef7edabe0f53e5ae1fe37b76
solution: add it back
solution: remove that part of test, matches other Unsubscribe tests now
solution: add back :(
=== RUN TestDeliverHeadersHang/protocol_64_mode_LIGHT fatal error: concurrent map iteration and map write goroutine 984 [running]: runtime.throw(0x459e978, 0x26) /usr/local/Cellar/go/1.9.2/libexec/src/runtime/panic.go:605 +0x95 fp=0xc420497c70 sp=0xc420497c50 pc=0x402dc25 runtime.mapiternext(0xc420497de8) /usr/local/Cellar/go/1.9.2/libexec/src/runtime/hashmap.go:778 +0x6f1 fp=0xc420497d08 sp=0xc420497c70 pc=0x400c2d1 runtime.mapiterinit(0x44f3f00, 0xc4207b3590, 0xc420497de8) /usr/local/Cellar/go/1.9.2/libexec/src/runtime/hashmap.go:768 +0x270 fp=0xc420497d70 sp=0xc420497d08 pc=0x400b980 github.com/ethereumproject/go-ethereum/eth/downloader.(*peerSet).medianRTT(0xc420138d00, 0x0) /Users/ia/gocode/src/github.com/ethereumproject/go-ethereum/eth/downloader/peer.go:566 +0x120 fp=0xc420497e58 sp=0xc420497d70 pc=0x4431fa0 github.com/ethereumproject/go-ethereum/eth/downloader.(*Downloader).qosTuner(0xc420800180) /Users/ia/gocode/src/github.com/ethereumproject/go-ethereum/eth/downloader/downloader.go:1624 +0x50 fp=0xc420497fd8 sp=0xc420497e58 pc=0x442e400 runtime.goexit() /usr/local/Cellar/go/1.9.2/libexec/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc420497fe0 sp=0xc420497fd8 pc=0x405dc01 created by github.com/ethereumproject/go-ethereum/eth/downloader.New /Users/ia/gocode/src/github.com/ethereumproject/go-ethereum/eth/downloader/downloader.go:250 +0xa16 goroutine 1 [chan receive]: solution: add a peerset un/lock in test
solution: use go test fatal instead of test-killing panic
whilei
commented
May 28, 2018
// FIXME?: Is this backwards? | ||
if fails <= 2 { | ||
glog.V(logger.Detail).Warnf("%s: %s delivery timeout", peer, strings.ToLower(kind)) | ||
if fails > 2 { |
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.
@tzdybal PTAL. IDK. WTF.
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.
whilei
force-pushed
the
fix/sync-stuck-near-head
branch
from
May 29, 2018 09:24
4593351
to
7da3be4
Compare
solution: add syncstatschainheight updater
This was referenced Jun 4, 2018
Closing via #619 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚳 The documentation below is WIP, but maybe useful for first-impressions.
Maybe rel #603, #604, #605, of which 603 and 605 are definitely related to a lot of ETH issues: https://github.com/ethereum/go-ethereum/search?q=fast+pivot&unscoped_q=fast+pivot&type=Issues
In digging around these issues and hunting and pecking through
blame
s andhistory
s, I found ethereum/go-ethereum#15857 (comment) in which Peter's referring (I presume) to ethereum/go-ethereum@55599ee#diff-6a6ebbb3908dd266c6717cdc1c7b84ed, and this is the PR from which these changes have been pseudo-cherry-picked. I would have loved to actually cherry-pick them, but no amount offetch
ing norgit am
patching would give me anything besidesor un-applyable patches. I guess this likely because the commits were made on a dev branch and somehow disappeared... 👻
But here's a rough reference of where this Frankenstein comes from:
And a few other other changes I had made earlier that were off-topic, but not worth throwing into their own PRs, IMO.
In manhandling these changes, there are a couple of things that I think warrant further refactoring in their own, later, PRs:
(hash, uint64)
signature for methods likeblockchain.HasHeader
,blockchain.GetTd
, and a few others, mostly akin to thedownloader.BlockChain
interface. This instead of plain(hash)
, because it provides an extra level of certainty.downloader.SyncProgress
struct as the returnable fordownloader.Progress
. Returning(uint64, uint64, uint64, uint64, uint64)
is just a pain in the ass.downloader.peerConnection
pattern instead of just plaindownloader.peer
.