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

Update set_finalizers host function to take a packed_finalizer_format #101

Merged
merged 2 commits into from
May 2, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented May 2, 2024

set_finalizers host function now takes a packed_finalizer_format to allow for future changes to packed format of finalizer policy.

         /**
          * Submits a finalizer set change.
          *
          *  // V0 format for packed finalizer_policy
          *  struct finalizer_authority {
          *     std::string              description;
          *     uint64_t                 weight = 0; // weight that this finalizer's vote has for meeting fthreshold
          *     std::vector<uint8_t>     public_key; // Affine little endian non-montgomery g1, cdt/abi_serializer has issues with std::array, size 96
          *  };
          *  struct finalizer_policy {
          *     uint64_t                          threshold = 0;
          *     std::vector<finalizer_authority>  finalizers;
          *  };
          *
          * Valid formats:
          * 0 : serialized finalizer_policy
          *
          * @ingroup privileged
          *
          * @param packed_finalizer_format - format of the finalizer_policy data blob.
          * @param packed_finalizer_policy - a serialized finalizer_policy object.
         */
         void set_finalizers(uint64_t packed_finalizer_format, span<const char> packed_finalizer_policy);

Depends on AntelopeIO/cdt#278 for compiling contracts.

Resolves #97

@heifner heifner requested review from linh2931 and greg7mdp May 2, 2024 00:48
@heifner heifner added the OCI Work exclusive to OCI team label May 2, 2024
@spoonincode spoonincode merged commit 918c5ae into main May 2, 2024
31 of 36 checks passed
@spoonincode spoonincode deleted the GH-97-set-finalizers branch May 2, 2024 16:34
heifner added a commit that referenced this pull request May 2, 2024
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: INTERNALS
summary: Improve set_finalizers host function to take a packed finalizer format.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IF: host function set_finalizers should take a packed_finalizer_format
5 participants