Skip to content

Trust Quorum: Better match protocol in TLA+ spec #8363

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewjstone
Copy link
Contributor

This PR changes the message implementation a bit and the PersistentState structure. It adds messages that will be used in follow up PRs, and ensures that rack_id is always checked on each message. Furthemore it stores configurations and shares separately inside the persistent state. This allows retrieval of a configuration for stale sled and the recomputation of its own share for that configuration to occur in separate steps. This matches what is done in the TLA+ spec.

I also added a comment about the intention of future code coming for the Node type. This reflects the experience of implementing LRTQ, and is helpful to simplify testing. If we don't have to track timeouts for arbitrary API requests inside the sans-io code, it becomes much simpler.

This PR changes the message implementation a bit and the
`PersistentState` structure. It adds messages that will be used in
follow up PRs, and ensures that `rack_id` is always checked on each
message. Furthemore it stores configurations and shares separately
inside the persistent state. This allows retrieval of a configuration
for stale sled and the recomputation of its own share for that
configuration to occur in separate steps. This matches what is done in
the TLA+ spec.

I also added a comment about the intention of future code coming for
the `Node` type. This reflects the experience of implementing LRTQ, and
is helpful to simplify testing. If we don't have to track timeouts for
arbitrary API requests inside the sans-io code, it becomes much simpler.
@andrewjstone andrewjstone requested a review from sunshowers June 17, 2025 22:56
@@ -55,24 +55,26 @@ impl CoordinatorState {
log: Logger,
now: Instant,
msg: ValidatedReconfigureMsg,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

msg should return this platforms config and share if easy enough. Then there is no need for the option.

Copy link
Contributor

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

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

Went over this in a live call -- looks good to me, the changes seem quite nice

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.

2 participants