Audit

The Audit module in the CESS Rust SDK provides interfaces to interact with the audit pallet on the CESS blockchain. This pallet manages storage miner challenge verification, including submission of proofs, verification results, and tracking challenge-related states.

Using this module, developers can:

  • Query the audit state and miner challenge results.

  • Submit storage or service proofs to the chain.

  • Verify proof results for idle or service challenges.


Query Interfaces

The following query APIs allow you to retrieve audit-related information directly from the blockchain:

  • challenge_snapshot - Retrieve challenge snapshot information for a specific miner or block.

  • counted_clear - Query the count of cleared (successfully completed) challenges.

  • counted_service_failed - Retrieve the count of failed service challenges for a miner.

  • challenge_slip - Check if a challenge slip exists for a given miner at a specific block, representing the deadline for proof submission.

  • verify_slip - Verify whether a challenge slip has been validated, storing the verification and liquidation time node along with the corresponding miner.


Transaction Interfaces

The following call (transaction) APIs allow miners or validators to interact with the audit system by submitting and verifying proofs:


Example Usage

All query and transaction functions under the audit module can be accessed through:

use cess_rust_sdk::chain::audit::query::StorageQuery as AuditQuery;
use cess_rust_sdk::chain::audit::transaction::StorageTransaction as AuditTransaction

Last updated

Was this helpful?