[DO-NOT-MERGE] Leios prototype#1793
Draft
bladyjoker wants to merge 503 commits into
Draft
Conversation
ed63794 to
9ea774a
Compare
a123a84 to
a571776
Compare
20 tasks
20 tasks
Also keep notes what to improve
for batched tx updates as first, next step
None of the indices are actually needed (given the current queries). Stumbled on this when analysing the sql_select_ebTxs_missing
This reverts commit 2cfbca2.
The previous name suggested it was only the connection to the database that was initialized. With the new notification responsibility, however, we do want to share the handle instance across threads. This was consistent already for the in-memory implementation (which must be shared too for consistent "persistence"). If we want multiple connections later, we can still create them from the same handle later.
This was seemingly off by one
This is obviously a dirty hack, but works to drive the development right now and side-steps key registration, while already exploring how to pass the voting key into the right consensus components.
This results in votes being forwarded already. However, this is obviously not safe to do this way in adversarial settings.
This is now possible because of de-duplication of the vote notification mechanism
This is consistent with the naiive N^2 diffusion of votes early sketch that is implemented.
Drops lenses/folds in favor of list comprehensions
This was raised by a reviewer and re-uses the haskell type we already have. The encoding, however, is deliberately flat to have small votes.
First PR to add voting capabilities to the `leios-prototype`: - Naiive N^2 vote diffusion via `LeiosNotify` - A new `VoteState` that allows to `addVote` and `subscribeVotes` - A voting thread that votes on completed EB closures - Missing: EB too old to vote check - Missing: EB validation - Mocked voting key registration (re-uses KES key bytes) - No vote validation (yet) - Threadnet properties that drove the implementation so far - Fixed re-trigger of EB notifications for already completed closures Roughly the components that were implemented in this PR: <img width="2872" height="904" alt="Leios voting (Current)(1)" src="https://github.com/user-attachments/assets/7e9e032c-d581-4dd1-b30d-9ced05967edc" /> **NOTE**: The failing test with seed `(SMGen 15462600834920737326 9156690725779514573,20)` is actually a lucky one that conflates two `VoterId` from the hacked KES key bytes. It will drive the follow-up PR that explores commitee selection paths.
This will avoid us needing to change the cardano-node code when we change message formats of the notify protocol. The abstraction over 'vote' is needed to avoid a cyclic dependency. Moving the toObject function would have been the alternative, but I followed the existing pattern.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR hosts changes to ouroboros-consensus related to Leios. I'm opening a PR for easier management and transparency to make changes visible at a glance.
More importantly, this branch will be tagged and sourced for Leios demos.
IT IS NOT INTENDED TO BE REVIEWED OR MERGED!