-
Notifications
You must be signed in to change notification settings - Fork 75
[CGKIELE-154] stabilize sync for iele testnet #442
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
broadcastNewBlockHash(newBlock, peersWithoutBlock) | ||
|
||
if (syncConfig.broadcastNewBlockHashes) { | ||
// the usefulness of this message is debatable, especially in private networks |
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.
Since we may need to make a decision in the future, can we start the comment as // NOTE
or // Note
, so that it is easily grep
-able?
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.
What decision do you mean? The message is part of ETH protocol, and other clients support it, so I think we also should retain it.
That said, I really don't know why it was introduced in the protocol or what are its practical applications. Maybe @KonradStaniec can shed light upon it?
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.
Isn't it used to inform other peers about the new blocks we have? Why do you think it's not needed?
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.
(I think what Christos means is adding a "Note" prefix to comments)
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.
Yes, adding a Note prefix to comments. But no stopper here.
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.
@rtkaczyk newBlocks
message is only sent to a subset of peers (if I remember correctly sqrt(n)
peers, where n
is the number of current peers), newBlockHashes
is sent to all peers.
And main reason for both of them to exist is that newBlockHashes
is much more lightweight and not load peer network that much (newBlockHashes
is only a hash, and then peer needs to download block directly, newBlocks
is the whole new block )
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.
I've added the "NOTE" just in case, but I still don't think there's anything to decide here
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.
The main problems with NewBlockHashes
:
- it's sent to the same peers that receive
NewBlock
, which is redundant - it's handled differently than
NewBlock
, where orphaned block is ignored, which is just weird NewBlock
should be completely sufficient, because nodes that received the message should forward it to the ones that didn'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.
The patch has been tested on the cluster and the expected behavior is observed.
278f509
to
36c0368
Compare
No description provided.