Function pallet_anchors::pallet::dispatchables::pre_commit
source · pub fn pre_commit<T: Config>(anchor_id: T::Hash, signing_root: T::Hash)
Expand description
Obtains an exclusive lock to make the next update to a certain
document version identified by anchor_id
on Centrifuge p2p network
for a number of blocks given
by PRE_COMMIT_EXPIRATION_DURATION_BLOCKS
value. signing_root
is a child node of the off-chain merkle tree of that document. In
Centrifuge protocol, a document is committed only after reaching
consensus with the other collaborators on the document. Consensus is
reached by getting a cryptographic signature from other parties by
sending them the signing_root
. To deny the counter-party the free
option of publishing its own state commitment upon receiving a
request for signature, the node can first publish a pre-commit. Only
the pre-committer account in the Centrifuge chain is allowed to
commit
a corresponding anchor before the pre-commit has expired.
Some funds are reserved on a succesful pre-commit call.
These funds are returned to the same account after a succesful
Pallet::commit()
call or explicitely if evicting the pre-commits
by calling Pallet::evict_pre_commits()
. For a more detailed
explanation refer section 3.4 of Centrifuge Protocol Paper
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::pre_commit
.