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.
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
Generate txhashset archives on 720 block intervals. #2813
Generate txhashset archives on 720 block intervals. #2813
Changes from all commits
b11f368
71dc8b5
34e1145
a80d98a
880d86d
b2e0330
da2c9bc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We need to think this through a bit. Our peer sends us a height and hash (the
sm_req
) but we are now effectively ignoring this and just sending the most recent snapshot.I wonder if we need to take the height send by our peer and quantize this to the nearest previous snapshot (i.e. the closest
720
snapshot to that height).Alternatively maybe we should be ignoring the values passed in by our peer - all we care about is serving the most recent snapshot?
We just need to be careful that our peer receives consistent data in terms of -
It is critical that these are on the same fork. If for whatever reason they are on a fork (i.e. another peer sent them the "wrong" latest headers) then they need to be able to rewind headers to the point where this txhashset exists on the chain. If they cannot then they cannot recover from this and the full txhashset is wasted.
I don't think this is a problem in practice because the txhashset is at least n blocks old (based on the horizon).
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 thought about it for a while, but I don't think we would want to provide them any other txhashset. I considered verifying that the requested header is within an expected range, but it seemed unlikely enough to not justify any additional complexity.