Module dock_core::modules::accumulator::pallet
source · Expand description
The module that hosts all the FRAME types needed to add this pallet to a runtime.
Structs
- Can be used to configure the genesis state of this pallet.
- The pallet implementing the on-chain logic.
Enums
- Contains one variant per dispatchable that can be called by an extrinsic.
- Custom dispatch errors of this pallet.
- The event emitted by this pallet.
Traits
- Configuration trait of this pallet.
Type Definitions
- Public key storage is kept separate from accumulator storage and a single key can be used to manage several accumulators. It is assumed that whoever (DID) owns the public key, owns the accumulator as well and only that DID can update accumulator.
- Stores latest accumulator as key value: accumulator id -> (created_at, last_updated_at, Accumulator)
created_atis the block number when the accumulator was created and is intended to serve as a starting point for anyone looking for all updates to the accumulator.last_updated_atis the block number when the last update was sent.created_atandlast_updated_attogether indicate which blocks should be considered for finding accumulator updates. Historical values and updates are persisted as events indexed with the accumulator id. The reason for not storing past values is to save storage in chain state. Another option could have been to store block numbers for the updates so that each block fromcreated_atdoesn’t need to be scanned but even that requires large storage as we expect millions of updates. Just keeping the latest accumulated value allows for any potential on chain verification as well. - ModuleDeprecatedType alias to
Pallet, to be used byconstruct_runtime.