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

Avoid adding new proposer policy if there is no change #6

Closed
arhag opened this issue Apr 3, 2024 · 0 comments · Fixed by #68 or #74
Closed

Avoid adding new proposer policy if there is no change #6

arhag opened this issue Apr 3, 2024 · 0 comments · Fixed by #68 or #74
Assignees
Labels
👍 lgtm OCI Work exclusive to OCI team
Milestone

Comments

@arhag
Copy link
Member

arhag commented Apr 3, 2024

The host function should check to see if the policy to be proposed is different than the last proposal policy in the queue (not the currently active one). If it is the same, it should avoid actually adding the policy to the queue (it acts like a no-op).

The host function would uint32_t max as the version number if the proposed policy is not invalid. If it is invalid (e.g. empty producers in the policy) it would return -1; this is the only time is returns -1. This means that if the caller of the host function proposes a policy that is identical to the one it last proposed, the host function will still return successfully (not with a -1 return value).

The diff in the block extension is relative to the previous policy proposed and represented in a block extension (as a diff) in the history of the chain.

This is a change the protocol, so if we want to do it we need to get it done before rc1. But it also is not necessary to make this change to the protocol prior to release.

@arhag arhag added 👍 lgtm and removed triage labels Apr 3, 2024
@arhag arhag transferred this issue from AntelopeIO/leap Apr 10, 2024
@arhag arhag changed the title IF: Avoid adding new proposer policy if there is no change Avoid adding new proposer policy if there is no change Apr 10, 2024
@arhag arhag added this to the Savanna: Cusp milestone Apr 10, 2024
@heifner heifner self-assigned this Apr 24, 2024
@heifner heifner added the OCI Work exclusive to OCI team label Apr 24, 2024
@heifner heifner moved this from Todo to In Progress in Team Backlog Apr 24, 2024
@heifner heifner linked a pull request Apr 24, 2024 that will close this issue
heifner added a commit that referenced this issue Apr 25, 2024
IF: Do not set new proposer policy unless different
@heifner heifner closed this as completed Apr 25, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Team Backlog Apr 25, 2024
@heifner heifner linked a pull request Apr 26, 2024 that will close this issue
@arhag arhag reopened this Apr 26, 2024
@github-project-automation github-project-automation bot moved this from Done to Todo in Team Backlog Apr 26, 2024
@heifner heifner moved this from Todo to In Progress in Team Backlog Apr 29, 2024
@heifner heifner moved this from In Progress to Awaiting Review in Team Backlog Apr 29, 2024
heifner added a commit that referenced this issue Apr 30, 2024
heifner added a commit that referenced this issue Apr 30, 2024
heifner added a commit that referenced this issue Apr 30, 2024
heifner added a commit that referenced this issue May 1, 2024
heifner added a commit that referenced this issue May 2, 2024
heifner added a commit that referenced this issue May 2, 2024
IF: Update new proposer policy algorithm
@github-project-automation github-project-automation bot moved this from Awaiting Review to Done in Team Backlog May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 lgtm OCI Work exclusive to OCI team
Projects
Archived in project
3 participants