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
- Ensure the origin is a signed transaction and the sender is a member of the shard.
- Validate the commitment length against the shard threshold.
- Validate each commitment element.
- Verify the proof of knowledge using the peer ID of the member.
- Update the status of the member to
Committed
and store the commitment. - If all members have committed, update the state of the shards to
Committed
and store the group commitment. - 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
.