-
Notifications
You must be signed in to change notification settings - Fork 9
Linear Leios #455
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
Merged
Merged
Linear Leios #455
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d84f95f
sim-rs: extract generic sim infrastructure
SupernaviX 840e78b
sim-rs: make message types protocol-specific
SupernaviX 74cee02
sim-rs: scaffold linear leios
SupernaviX 0ba6566
sim-rs: add TXs to linear leios
SupernaviX 52b4e9d
sim-rs: add RBs to linear leios
SupernaviX c766321
sim-rs: Add TXs to RBs in linear leios
SupernaviX 92d59d7
sim-rs: propagate RB headers and bodies separately
SupernaviX 0cdbc4a
sim-rs: generate and propagate EBs
SupernaviX c86fb21
sim-rs: generate and propagate votes
SupernaviX 1948e7a
sim-rs: add certs on-chain
SupernaviX cce4aae
sim-rs: prune EB TXs from mempool
SupernaviX 003c5bb
sim-rs: handle conflicts
SupernaviX 5ba8faa
sim-rs: support random tx sampling
SupernaviX 7997eac
sim-rs: only include EBs if enough time has passed
SupernaviX 1aaa946
sim-rs: only filter EBs from mempool when enough time has passed
SupernaviX a9985e9
sim-rs: only consider blocks on-chain when we have bodies
SupernaviX ce68f85
sim-rs: add linear leios README
SupernaviX 1f4ced6
sim-rs: EB producers may vote for their EBs
SupernaviX 5da00d5
sim-rs: Fix EB propagation
SupernaviX 3cea397
Update README
SupernaviX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| leios-variant: linear |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Linear Leios (rust simulation) | ||
|
|
||
| To run it, set `leios-variant` to `linear`. | ||
|
|
||
| The log file schema is currently identical to every other variant (though `pipeline` is always 0). | ||
|
|
||
| ## Description | ||
|
|
||
| Whenever a node creates an RB, it also creates an EB. The RB header contains a reference to this new EB. If the RB producer has a certificate for the parent RB’s EB, it will include that certificate in the RB body. | ||
|
|
||
| RB headers are diffused separately from bodies. When a node receives an RB header, it checks whether that RB should be the new head of its chain. If so, it will request the RB body and the referenced EB (from the first peer which announces them). | ||
|
|
||
| When a node receives an RB body, it immediately removes all referenced/conflicting transactions from its mempool. If the RB has an EB certificate, it also removes that EB’s transactions from its mempool. | ||
|
|
||
| When a node receives an EB body, it immediately runs a VRF lottery, and if successful, transmits votes for that EB. If the EB has been certified after L_vote + L_diff slots have passed, the node removes all of its transactions from the mempool (under the assumption that the EB will make it on-chain). | ||
nfrisby marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## New parameters | ||
|
|
||
| |Name|Description|Default value| | ||
| |---|---|---| | ||
| |`linear-vote-stage-length-slots`|How many slots the EB voting stage is allowed to last. For equivocation protection, this should be at least 3 * delta_hdr (which is currently 1 second).|5| | ||
| |`linear-diffuse-stage-length-slots`|How many slots are votes allowed to diffuse.|5| | ||
| |`eb-body-avg-size-bytes`|If `simulate-transactions` is false, this controls the size of the EBs we generate.|0| | ||
| |`vote-generation-cpu-time-ms-per-tx`|A per-transaction CPU cost to apply when generating new vote bundles.|0| | ||
|
|
||
| ## Not yet implemented | ||
| - Freshest first delivery is not implemented for EBs, though EBs are created infrequently enough that this likely doesn't matter. | ||
| - We are not yet applying voting rules; if you’re allowed to vote, you will always vote. | ||
| - We are not yet accounting for equivocation. | ||
| - Nodes are supposed to wait until the diffuse stage to vote for an EB, they are currently voting as soon as they can. | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| leios-variant: linear | ||
| timestamp-resolution-ms: 0.05 |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.