Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Conversation

@zilm13
Copy link
Collaborator

@zilm13 zilm13 commented May 11, 2018

  • Headers DB removed after fast sync is over if "skipHistory" option was not enabled. No restart is required
  • Fixed bug in SyncQueueReverseImpl which could force Fast sync to stall for a long time when it needs only to download 256 blocks
  • More aggressive sync pool strategy is used during syncing: other peers are dropped if they are not used and we need more peers for sync while other peers are not suitable for our needs

@zilm13 zilm13 requested a review from mkalinin May 11, 2018 14:15
@coveralls
Copy link

coveralls commented May 11, 2018

Coverage Status

Coverage decreased (-0.09%) to 55.914% when pulling 58f0322 on fix/remove-headers-db into e6a5dd6 on develop.

for (Value value: dataList) {
if (value == null) continue; // Bad sign
dataListRLP.add(value.getData());
dataListRLP.add(value.asBytes());
Copy link
Contributor

Choose a reason for hiding this comment

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

It results in a list with not encoded elements

needToDrop = true;
}
// Drop bad peers before creating channel
if (!needToDrop && nodeManager.getNodeStatistics(new Node(new byte[0], ch.remoteAddress().getHostString(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Requesting for nodeManager.isReputationPenalized(InetSocketAddress addr) which does all the job

if (request == null) {
long t = System.currentTimeMillis();
logger.debug("Received node which was not requested: " + toHexString(pair.getKey()) + " from " + idle);
idle.disconnect(ReasonCode.USELESS_PEER);
Copy link
Contributor

Choose a reason for hiding this comment

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

This case could not be related to the meaning of log message standing above. It may be a result of pendingNodes purging due to REQUEST_TIMEOUT. Isn't it too rude to disconnect peer with USELESS_PEER reason in that case? Btw, log message could also be fixed to avoid misunderstanding in the future.

@zilm13 zilm13 deleted the fix/remove-headers-db branch June 4, 2018 15:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants