Skip to content
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

Increase node diversity when downloading blocks #2033

Merged
merged 5 commits into from
Mar 17, 2021

Conversation

matkt
Copy link
Contributor

@matkt matkt commented Mar 16, 2021

Signed-off-by: Karim TAAM karim.t2am@gmail.com

PR description

As a node operator, I don't want to see "Failed to download block 0xhex from peer 0xhex..." message from the same node over and over. I want to see besu fail over to another node and try again rather than failing from the same node

Tes performed

  • Run goerli node

Changelog

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@matkt matkt linked an issue Mar 16, 2021 that may be closed by this pull request
LOG.debug("Downloading block {} from peers {}.", hash, peers.stream().map(EthPeer::toString));
final Optional<EthPeer> peer =
peers.stream().filter(ethPeer -> !triedAndInvalidPeers.contains(ethPeer)).findFirst();
if (peer.isPresent() && !peer.get().isDisconnected()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If even one peer is disconnected then we stop trying for others as well? I'm working on making this method simpler anyways, I'll show you my changes once I write them up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updated the code thanks to your PR. thanks

RatanRSur and others added 2 commits March 16, 2021 10:20
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
…-block

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@matkt matkt merged commit f21cccc into hyperledger:master Mar 17, 2021
RichardH92 pushed a commit to RichardH92/besu that referenced this pull request Mar 29, 2021
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Richard Hart <richardhart92@gmail.com>
@matkt matkt deleted the feature/increate-node-diversity-block branch April 13, 2021 11:20
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase node diversity when downloading blocks
2 participants