-
Notifications
You must be signed in to change notification settings - Fork 14
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
chore(code/part_stream): Use random StreamId
#583
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t re-used when a node crashes and restarts quickly
romac
changed the title
chore(code/part_stream): Use random StreamId
chore(code/part_stream): Use random Nov 20, 2024
StreamId
ancazamfir
reviewed
Nov 21, 2024
ancazamfir
reviewed
Nov 21, 2024
let stream_id = self.next_stream_id; | ||
// Wrap around if we get to u64::MAX, which may happen if the initial | ||
// stream id was close to it already. | ||
self.next_stream_id = self.next_stream_id.wrapping_add(1); |
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.
👍
ancazamfir
approved these changes
Nov 21, 2024
cason
pushed a commit
that referenced
this pull request
Nov 22, 2024
josef-widder
added a commit
that referenced
this pull request
Nov 22, 2024
* startin with witnesses and invariants * more invariants * feat(code): Start consensus at `H+1` where `H` is the height of the latest committed block (#587) * feat(code): Start consensus at `H+1` where `H` is the height of the latest committed block * Update spawn.bash * chore(code/part_stream): Deduplicate received proposal parts by sequence number (#584) * chore(code/part_stream): Use random `StreamId` (#583) * chore(code/part_stream): Use random StreamId to ensure a stream is not re-used when a node crashes and restarts quickly * Start with random StreamId and increment from there * spec/quint: some renaming and comments * spec/quint: undoing new line changes * spec/quint: witness renamed, comments added * spec/quint: invariant renamed, comments adapted * spec/quint: invariant renamed, comments adapted * more invariants * spec/quint: re-tabbing blocksync.qnt * spec/quint: fix comments, types, identation --------- Co-authored-by: Romain Ruetschi <[email protected]> Co-authored-by: Daniel Cason <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This ensures that a stream id is not re-used when a node crashes and restarts quickly.