pallet_shards::pallet::dispatchables

Function commit

Source
pub fn commit<T: Config>(
    shard_id: ShardId,
    commitment: Commitment,
    proof_of_knowledge: ProofOfKnowledge,
)
Expand description

Allows a member to submit a commitment to a shard.

§Flow

  1. Ensure the origin is a signed transaction and the sender is a member of the shard.
  2. Validate the commitment length against the shard threshold.
  3. Validate each commitment element.
  4. Verify the proof of knowledge using the peer ID of the member.
  5. Update the status of the member to Committed and store the commitment.
  6. If all members have committed, update the state of the shards to Committed and store the group commitment.
  7. Emit the Event::ShardCommitted event.

§Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::commit.