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

Use diffs for proposer finalizer policy and proposer policy in block_header extension #5

Closed
heifner opened this issue Sep 7, 2023 · 3 comments · Fixed by #118 or #125
Closed
Assignees
Labels
consensus-protocol Change to the consensus protocol. Impacts light client validation. 👍 lgtm OCI Work exclusive to OCI team
Milestone

Comments

@heifner
Copy link
Member

heifner commented Sep 7, 2023

No description provided.

@bhazzard bhazzard added 👍 lgtm and removed triage labels Jan 16, 2024
@arhag arhag transferred this issue from AntelopeIO/leap Apr 10, 2024
@arhag arhag changed the title IF: Provide proposed finalizer_set diffs instead of complete finalizer_set in block_header extension Provide proposed finalizer_set diffs instead of complete finalizer_set in block_header extension Apr 10, 2024
@arhag arhag added this to the Savanna: Cusp milestone Apr 10, 2024
@heifner
Copy link
Member Author

heifner commented Apr 25, 2024

Current finalizer_policy

   struct finalizer_policy {
      uint32_t                         generation = 0; ///< sequentially incrementing version number
      uint64_t                         threshold = 0;  ///< vote weight threshold to finalize blocks
      std::vector<finalizer_authority> finalizers;     ///< Instant Finality voter set
  • Options for finalizer set
    • Order of finalizers part of consensus
      • Order by description and require unique description
      • Order by finalizer BLS key by <==> of affine_non_montgomery_le.
      • host function requires correct order
        • order in contract table for block explorers is presented in expected order
        • return -1 and don't modify finalizer_policy if not in correct order
      • host function sorts in correct order
        • easier for contract, block explorer has to know to sort to display correctly
      • diff is threshold, vector<size_t> to_remove, vector<finalizer_authority> to_add_sorted
    • Any order of finalizers allowed
      • Set in whatever order provided by host function
      • Change of order from host function sets new policy even if it is just a shuffle of existing set
      • diff is threshold, vector<size_t> to_remove, vector<tuple<size_t, finalizer_authority>> to_add
        • size_t index in to_remove is index of items to remove from set, index is before any removals
        • size_t index in to_add is index of insertion location after removals

@arhag
Copy link
Member

arhag commented Apr 26, 2024

We agreed to go with the option in which the protocol respects the order of finalizer authorities provided by the proposer.

We also agreed that since that algorithm for generating the diffs respects order, it is trivial to also apply this diff strategy for the producer policy as well.

Also, we want the diffs to include the expected generation / version of the new policy.

@arhag arhag changed the title Provide proposed finalizer_set diffs instead of complete finalizer_set in block_header extension Use diffs for proposer finalizer policy and proposal policy in block_header extension Apr 26, 2024
@arhag arhag changed the title Use diffs for proposer finalizer policy and proposal policy in block_header extension Use diffs for proposer finalizer policy and proposer policy in block_header extension Apr 26, 2024
@heifner heifner added the OCI Work exclusive to OCI team label Apr 26, 2024
@heifner heifner moved this from Todo to In Progress in Team Backlog Apr 30, 2024
heifner added a commit that referenced this issue May 7, 2024
heifner added a commit that referenced this issue May 7, 2024
heifner added a commit that referenced this issue May 7, 2024
heifner added a commit that referenced this issue May 7, 2024
@heifner heifner linked a pull request May 7, 2024 that will close this issue
heifner added a commit that referenced this issue May 7, 2024
heifner added a commit that referenced this issue May 8, 2024
heifner added a commit that referenced this issue May 8, 2024
heifner added a commit that referenced this issue May 8, 2024
heifner added a commit that referenced this issue May 9, 2024
@heifner heifner linked a pull request May 9, 2024 that will close this issue
heifner added a commit that referenced this issue May 9, 2024
IF: Use finalizer diffs in instant_finality_extension
@github-project-automation github-project-automation bot moved this from In Progress to Done in Team Backlog May 9, 2024
@heifner heifner reopened this May 9, 2024
@github-project-automation github-project-automation bot moved this from Done to Todo in Team Backlog May 9, 2024
@heifner heifner moved this from Todo to In Progress in Team Backlog May 9, 2024
@heifner heifner moved this from In Progress to Awaiting Review in Team Backlog May 9, 2024
heifner added a commit that referenced this issue May 9, 2024
heifner added a commit that referenced this issue May 10, 2024
IF: Use proposer diffs in instant_finality_extension
@github-project-automation github-project-automation bot moved this from Awaiting Review to Done in Team Backlog May 10, 2024
@arhag arhag reopened this May 10, 2024
@github-project-automation github-project-automation bot moved this from Done to Todo in Team Backlog May 10, 2024
@ericpassmore
Copy link
Contributor

ericpassmore commented May 10, 2024

Note:start
group: STABILITY
category: PERFORMANCE
summary: Improve algorithm for diffs of finalizer policy and proposer policy.
Note:end

heifner added a commit that referenced this issue May 14, 2024
heifner added a commit that referenced this issue May 14, 2024
… alternative approach of sorting but maintaining original index.
heifner added a commit that referenced this issue May 14, 2024
@heifner heifner moved this from Todo to In Progress in Team Backlog May 14, 2024
@arhag arhag added the consensus-protocol Change to the consensus protocol. Impacts light client validation. label Jun 12, 2024
systemzax added a commit that referenced this issue Jul 25, 2024
… leave room for additional test covering joint finalizer policies
@arhag arhag closed this as not planned Won't fix, can't repro, duplicate, stale Aug 6, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Team Backlog Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus-protocol Change to the consensus protocol. Impacts light client validation. 👍 lgtm OCI Work exclusive to OCI team
Projects
Archived in project
5 participants