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

Further improvements to consensus ordering #267

Merged
merged 3 commits into from
Aug 28, 2024
Merged

Further improvements to consensus ordering #267

merged 3 commits into from
Aug 28, 2024

Conversation

dr-orlovsky
Copy link
Member

This PR introduces two things:

  • nonce value is extended from u8 to u64, basing on @zoedberg suggestion form RCP-240731A: Improvements to consensus ordering of state processing RFC#10 (comment), in order to support eltoo and similar future versions of lightning;
  • operation type is accounted for in the ordering, having priority before nonce. If we have two different state transitions of different mined into the same block, which (by mistake) have the same nonce, we still can order them using type. This allows usage of type id value as a way of setting strong ordering overriding nonce values (for instance token issues can be always ordered before spendings)

@dr-orlovsky dr-orlovsky added enhancement New feature or request *consensus* Issues affecting distributed concensus labels Aug 17, 2024
@dr-orlovsky dr-orlovsky added this to the v0.11.0 milestone Aug 17, 2024
@dr-orlovsky dr-orlovsky requested a review from zoedberg August 17, 2024 07:08
@dr-orlovsky dr-orlovsky self-assigned this Aug 17, 2024
rationale: in eltoo the graph can grow up to u48 transactions. Even though not of all would be published, some may, and all of them must be ordered appropriately
If we have two different state transitions of different mined into the same block, which (by mistake) have the same nonce, we still can order them using type. This allows usage of type id value as a way of setting strong ordering overriding nonce values (for instance token issues can be always ordered before spendings)
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 24 lines in your changes missing coverage. Please review.

Project coverage is 13.2%. Comparing base (333b3b1) to head (1f6e982).
Report is 4 commits behind head on master.

Files Patch % Lines
src/vm/contract.rs 0.0% 19 Missing ⚠️
src/operation/operations.rs 0.0% 3 Missing ⚠️
src/operation/commit.rs 0.0% 1 Missing ⚠️
src/validation/consignment.rs 0.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #267     +/-   ##
========================================
- Coverage    13.3%   13.2%   -0.1%     
========================================
  Files          29      29             
  Lines        3867    3883     +16     
========================================
  Hits          513     513             
- Misses       3354    3370     +16     
Flag Coverage Δ
rust 13.2% <0.0%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@zoedberg zoedberg left a comment

Choose a reason for hiding this comment

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

tACK 1f6e982

@dr-orlovsky dr-orlovsky merged commit 4f67584 into master Aug 28, 2024
24 of 25 checks passed
@dr-orlovsky dr-orlovsky deleted the nonce branch September 4, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*consensus* Issues affecting distributed concensus enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants