Expand description

Auto-generated docs-only module listing all defined dispatchables for this pallet.

§Warning: Doc-Only

Members of this module cannot be used directly and are only provided for documentation purposes. To see the real version of each dispatchable, look for them in Pallet or Call.

Functions§

  • Commits a document_root of a merklized off chain document in Centrifuge p2p network as the latest version id(anchor_id) obtained by hashing anchor_id_preimage. If a pre-commit exists for the obtained anchor_id, hash of pre-committed signing_root + proof must match the given doc_root. Any pre-committed data is automatically removed on a succesful commit and the reserved funds from Pallet::pre_commit() are returned to the same account. To avoid state bloat on chain, the committed anchor would be evicted after the given stored_until_date. The calling account would be charged accordingly for the storage period. For a more detailed explanation refer section 3.4 of Centrifuge Protocol Paper
  • Initiates eviction of expired anchors. Since anchors are stored on a child trie indexed by their eviction date, what this function does is to remove those child tries which has date_represented_by_root < current_date. Additionally it needs to take care of indexes created for accessing anchors, eg: to find an anchor given an id.
  • Initiates eviction of pre-commits that has expired given a list on anchor ids. For each evicted pre-commits, the deposit holded by Pallet::pre_commit() call will be returned to the same account that made it originally.
  • 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