feat!: chainlock optimized verification - #1621
Merged
Merged
Conversation
ogabrielides
left a comment
Contributor
There was a problem hiding this comment.
some comments + questions
ogabrielides
suggested changes
Dec 16, 2023
…pay/platform into feat/chainlockOptimizedVerification
shumkov
reviewed
Jan 10, 2024
shumkov
requested changes
Jan 25, 2024
shumkov
reviewed
Jan 26, 2024
| { | ||
| "name": "@dashevo/platform", | ||
| "version": "1.0.0-dev.3", | ||
| "version": "1.0.0-pr.1621.3", |
Collaborator
There was a problem hiding this comment.
Please revert versions before we merge it
| // Scoring system logic | ||
| let mut scores: Vec<(ReversedQuorumHashBytes, &BlsPublicKey, [u8; 32])> = Vec::new(); | ||
|
|
||
| for (quorum_hash, public_key) in quorums { |
Collaborator
There was a problem hiding this comment.
Extract to private method to remove duplication?
Member
Author
|
CI was green before so merging. |
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.
Issue being fixed or feature implemented
Chain Locks had a few issues in our system. When a proposer proposes a chain lock, all other nodes must verify this chain lock, but they must also be synced up to that chain lock height. This might not always be the case in rare circumstances.
We were also calling core on each verification. This is overkill, as we could cache the chain lock quorums and verify core chain locks in Platform instead as long as we had those quorum public keys.
What was done?
Chain locks now are verified in Platform.
In the race condition that Platform knows about a valid chain lock but core does not they are submitted to core.
In the rare case that Platform can not verify a chain lock they are verified through core.
How Has This Been Tested?
Strategy tests were created.
Breaking Changes
This introduces many breaking changes. Most notably that the state now contains information about chain lock quorums.
Checklist:
For repository code-owners and collaborators only