This repository was archived by the owner on Aug 23, 2020. It is now read-only.
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.
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.
not sure if the following suggestion makes sense:
if it's a milestone, then
continue
, elsebreak
.the reason being:
this mechanism can be used to fill the request queue with arbitrary data faster.
in the current code the first
?
would be requested and stop (and if this?
does not exist the rest will never be requested, with this change all the historical?
s will be requested (up until themaxProccessedTransactions
is reached).I'm not sure this is such an issue, but my proposal would not change behavior for random transactions but achieve the improvement for syncing nodes.
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 this true? In the current code, upon the next call of this method, the first
?
will already be in the requester queue, and theif (!transactionRequester.isTransactionRequested(hashPointer, milestone)) {
will return false: so it will continue to request the next?
.This being said I don't get your point on
continue
only if it's a milestone.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 Alon's point is that all branches that are not confirmed by a milestone are "arbitrary data" and we don't want to have spend time or resources on them. The requester queue can fill up with sidetangle requests and thus hinder the solidification of "milestone branches".
However, if the
TipsSolidifier
is not enabled we are not supposed to be solidifying on "arbitrary data", and if it is enabled then maybe it is because the operator cares about "arbitrary data"?Bottom line, due to the
TipsSolidifier
activation config I am with @karimodm.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.
good point @karimodm, still this will take time to fill (1 tx per scan). I still think that this can be avoided by separating the cases; it will reduce the amount of change.
However, I don't insist on this, if @GalRogozinski thinks it's fine then I'm OK.
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.
Doesn't the
continue
here make the queue fill faster in any of the cases?@GalRogozinski true on arbitrary data, this change combined with the requester freshness should fend off those scenarios though.