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

IF: Host function to set active finalizer set #1511

Closed
Tracked by #1508
arhag opened this issue Aug 17, 2023 · 2 comments · Fixed by #1561
Closed
Tracked by #1508

IF: Host function to set active finalizer set #1511

arhag opened this issue Aug 17, 2023 · 2 comments · Fixed by #1561
Assignees

Comments

@arhag
Copy link
Member

arhag commented Aug 17, 2023

Depends on #1509.

One new host function called set_finalizers should be added upon the activation of the IF protocol feature.

@arhag
Copy link
Member Author

arhag commented Aug 17, 2023

@arhag arhag assigned heifner and unassigned fcecin Aug 17, 2023
@arhag arhag assigned fcecin and unassigned heifner Aug 21, 2023
@arhag arhag moved this from Todo to In Progress in Team Backlog Aug 22, 2023
@arhag
Copy link
Member Author

arhag commented Aug 23, 2023

The structure provided to the host function (typically referred to as the "finalizer set") should include:

  • uint64_t threshold
  • std::vector of structs that each contain:
    • finalizer_key which is a BLS public key
    • uint64_t weight (check that this is not zero)
    • std::string description (this is intended to hold the name of the producer using this finalizer key)

The host function should ensure that the finalizer_key is unique within the std::vector. It should also add all weights and ensure that the threshold is greater than half the total weight.

The threshold value is used instead of assuming a hard-coded number of 15 as is currently done in the code: #1536 (comment).

Also, the size of the std::vector should be used instead of assuming a hard-coded number of 21 as is currently done in the code: #1536 (comment)

fcecin added a commit that referenced this issue Aug 25, 2023
Work in progress.

- Implemented host function (not tested);
- Finalizer set types;
- Placeholders for fc::crypto::blslib::bls_public_key operators == != and <;
- Stub notify_set_finalizers signal to be connected to chain_plugin, to reach chain_pacemaker
@arhag arhag linked a pull request Aug 29, 2023 that will close this issue
@BenjaminGormanPMP BenjaminGormanPMP moved this from In Progress to Awaiting Review in Team Backlog Aug 29, 2023
heifner added a commit that referenced this issue Aug 30, 2023
@arhag arhag closed this as completed Aug 30, 2023
@github-project-automation github-project-automation bot moved this from Awaiting Review to Done in Team Backlog Aug 30, 2023
@arhag arhag removed this from the Leap v5.0.0-rc1 milestone Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants