Skip to content
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

Document and adjust alarm delivery precedence over network messages #318

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

masih
Copy link
Member

@masih masih commented Jun 7, 2024

Document the implicit assumption that the delivery of alarms to a participant must take precedence over broadcast messages.

Adjust simulation message queue to respect the alarm ordering.

Fixes #316

@masih masih requested review from anorth and Kubuxu June 7, 2024 11:10
Copy link

codecov bot commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.85%. Comparing base (bc77de6) to head (787e8ef).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #318      +/-   ##
==========================================
- Coverage   84.99%   84.85%   -0.14%     
==========================================
  Files          14       14              
  Lines        1486     1486              
==========================================
- Hits         1263     1261       -2     
- Misses        139      140       +1     
- Partials       84       85       +1     

see 1 file with indirect coverage changes

Document the implicit assumption that the delivery of alarms to a
participant must take precedence over broadcast messages.

Adjust simulation message queue to respect the alarm ordering.

Fixes #316
@masih masih force-pushed the masih/sim-alarm-precedence branch from 93e1983 to 787e8ef Compare June 7, 2024 11:25
@Kubuxu
Copy link
Contributor

Kubuxu commented Jun 7, 2024

This is hard or almost impossible to guarantee in an environment where signing is async and can fail. I will open an issue about it.

@Kubuxu
Copy link
Contributor

Kubuxu commented Jun 7, 2024

#319

Copy link
Contributor

@Kubuxu Kubuxu left a comment

Choose a reason for hiding this comment

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

Codewise and resolving the immediate issue, it seems good to me, but directionally I think we want something else.

@masih
Copy link
Member Author

masih commented Jun 7, 2024

This is hard or almost impossible to guarantee in an environment where signing is async and can fail. I will open an issue about it.

Even for alarms? Alarms have no signing. right?

@masih masih added this pull request to the merge queue Jun 7, 2024
@Kubuxu
Copy link
Contributor

Kubuxu commented Jun 7, 2024

Ahh, wait, I might have miss-read it, I assumed broadcast have precedence, I can for sure make the alarms take precedence.

On the other hand, in a real system, there is a possibility of a message arriving just before the alarm but IDK if it will be an issue.

Merged via the queue into main with commit 1dfe25f Jun 7, 2024
6 of 7 checks passed
@masih masih deleted the masih/sim-alarm-precedence branch June 7, 2024 13:35
masih added a commit that referenced this pull request Jun 11, 2024
The gpbft implementation implicitly assumes that broadcast of `CONVERGE`
messages to self are delivered immediately. In practice this assumption
does not hold because of the complexity in deferred signing and async
message delivery.

The changes here relax this assumption by explicitly notifying the local
converge state that the self participant has begun the `CONVERGE` step,
providing self proposal and justification for the proposal. The code
then considers the given data whenever search in converge state does not
bear any results, caused by asynchronous message delivery. Further, the
code ignores the self converge value once at least one broadcast message
is received.

Fixes #316
Reverts #318
Relates to #103 (comment)
masih added a commit that referenced this pull request Jun 11, 2024
The gpbft implementation implicitly assumes that broadcast of `CONVERGE`
messages to self are delivered immediately. In practice this assumption
does not hold because of the complexity in deferred signing and async
message delivery.

The changes here relax this assumption by explicitly notifying the local
converge state that the self participant has begun the `CONVERGE` step,
providing self proposal and justification for the proposal. The code
then considers the given data whenever search in converge state does not
bear any results, caused by asynchronous message delivery. Further, the
code ignores the self converge value once at least one broadcast message
is received.

Additionally, the changes remove zero-latency for messages to self in
simulations to make a stronger assertion that synchronous message
delivery to self is no longer required (neither for `GMessage` nor
alarms).

Fixes #316
Reverts #318
Relates to #103 (comment)
masih added a commit that referenced this pull request Jun 11, 2024
The gpbft implementation implicitly assumes that broadcast of `CONVERGE`
messages to self are delivered immediately. In practice this assumption
does not hold because of the complexity in deferred signing and async
message delivery.

The changes here relax this assumption by explicitly notifying the local
converge state that the self participant has begun the `CONVERGE` step,
providing self proposal and justification for the proposal. The code
then considers the given data whenever search in converge state does not
bear any results, caused by asynchronous message delivery. Further, the
code ignores the self converge value once at least one broadcast message
is received.

Additionally, the changes remove zero-latency for messages to self in
simulations to make a stronger assertion that synchronous message
delivery to self is no longer required (neither for `GMessage` nor
alarms).

Fixes #316
Reverts #318
Relates to #103 (comment)
anorth pushed a commit that referenced this pull request Jun 11, 2024
The gpbft implementation implicitly assumes that broadcast of `CONVERGE`
messages to self are delivered immediately. In practice this assumption
does not hold because of the complexity in deferred signing and async
message delivery.

The changes here relax this assumption by explicitly notifying the local
converge state that the self participant has begun the `CONVERGE` step,
providing self proposal and justification for the proposal. The code
then considers the given data whenever search in converge state does not
bear any results, caused by asynchronous message delivery. Further, the
code ignores the self converge value once at least one broadcast message
is received.

Additionally, the changes remove zero-latency for messages to self in
simulations to make a stronger assertion that synchronous message
delivery to self is no longer required (neither for `GMessage` nor
alarms).

Fixes #316
Reverts #318
Relates to #103 (comment)
github-merge-queue bot pushed a commit that referenced this pull request Jun 11, 2024
…ly (#334)

* Relax the assumption of receiving own `CONVERGE` messages synchronously

The gpbft implementation implicitly assumes that broadcast of `CONVERGE`
messages to self are delivered immediately. In practice this assumption
does not hold because of the complexity in deferred signing and async
message delivery.

The changes here relax this assumption by explicitly notifying the local
converge state that the self participant has begun the `CONVERGE` step,
providing self proposal and justification for the proposal. The code
then considers the given data whenever search in converge state does not
bear any results, caused by asynchronous message delivery. Further, the
code ignores the self converge value once at least one broadcast message
is received.

Additionally, the changes remove zero-latency for messages to self in
simulations to make a stronger assertion that synchronous message
delivery to self is no longer required (neither for `GMessage` nor
alarms).

Fixes #316
Reverts #318
Relates to #103 (comment)

* Adjust naming and comments.

---------

Co-authored-by: Alex North <445306+anorth@users.noreply.github.com>
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.

Receiving alarms must take precedence over receiving broadcasted messages
2 participants