Skip to content

Merge together state and faststate packages#3365

Merged
lukasz-zimnoch merged 6 commits intomainfrom
sync-async
Oct 25, 2022
Merged

Merge together state and faststate packages#3365
lukasz-zimnoch merged 6 commits intomainfrom
sync-async

Conversation

@pdyraga
Copy link
Copy Markdown
Member

@pdyraga pdyraga commented Oct 24, 2022

Refs #3366
See this discussion: #3362 (comment)

The goal of the changes is to merge together faststate and state packages. Instead of two packages, we are going to have one state package with two implementations of the state machine: asynchronous and synchronous.

state.SyncMachine is meant to be used with interactive protocols when participants are expected to synchronize based on the number of blocks being mined at the time the protocol is executing. Even if the given participant received all the necessary information to continue the protocol, the state machine waits with proceeding to the next step for the fixed duration of blocks. This approach is the most optimal when the protocol may finish successfully even if some members expected to participate in the execution are inactive.

state.AsyncMachine is meant to be used with interactive protocols when participants are expected to synchronize based on the messages being sent and some participants may be slower than others. Each protocol participant, to finish the execution, must wait for the slowest participant. This approach is the most optimal when the protocol may finish successfully only if all members expected to participate in the execution are actively participating.

The goal of the changes is to merge together `faststate` and `state` packages.
Instead of two packages, we are going to have one `state` package with two
implementations of the state machine: asynchronous and synchronous.
The goal of the changes is to merge together `faststate` and `state` packages.
Instead of two packages, we are going to have one `state` package with two
implementations of the state machine: asynchronous and synchronous.
The goal of the changes is to merge together `faststate` and `state` packages.
Instead of two packages, we are going to have one `state` package with two
implementations of the state machine: asynchronous and synchronous.
The goal of the changes is to merge together `faststate` and `state` packages.
Instead of two packages, we are going to have one `state` package with two
implementations of the state machine: asynchronous and synchronous.
The goal of the changes is to merge together `faststate` and `state` packages.
Instead of two packages, we are going to have one `state` package with two
implementations of the state machine: asynchronous and synchronous.
The goal of the changes is to merge together `faststate` and `state` packages.
Instead of two packages, we are going to have one `state` package with two
implementations of the state machine: asynchronous and synchronous.

state.SyncMachine is meant to be used with interactive protocols when
participants are expected to synchronize based on the number of blocks being
mined at the time the protocol is executing. Even if the given participant
received all the necessary information to continue the protocol, the state
machine waits with proceeding to the next step for the fixed duration of
blocks. This approach is the most optimal when the protocol may finish
successfully even if some members expected to participate in the execution
are inactive.

state.AsyncMachine is meant to be used with interactive protocols when
participants are expected to synchronize based on the messages being sent and
some participants may be slower than others. Each protocol participant, to
finish the execution, must wait for the slowest participant. This approach is
the most optimal when the protocol may finish successfully only if all
members expected to participate in the execution are actively participating.
@pdyraga pdyraga added this to the v2.0.0-m2 milestone Oct 24, 2022
@pdyraga pdyraga self-assigned this Oct 24, 2022
@pdyraga pdyraga mentioned this pull request Oct 24, 2022
@lukasz-zimnoch lukasz-zimnoch merged commit 278746d into main Oct 25, 2022
@lukasz-zimnoch lukasz-zimnoch deleted the sync-async branch October 25, 2022 10:59
@pdyraga pdyraga removed their assignment Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants