Crate dkg_primitives
source ·Re-exports
pub use serde_json;
Modules
Macros
- Conditional compilation depending on whether ethereum-types is built with ethbloom support.
Structs
- Bloom hash type with 256 bytes (2048 bits) size.
- A custom get Struct to allow to import runtime values into the dkg gadget
- The error type for parsing numbers from strings.
- Proposal Target Function Signature (4 bytes).
- Fixed-size uninterpreted hash type with 16 bytes (128 bits) size.
- Fixed-size uninterpreted hash type with 20 bytes (160 bits) size.
- Fixed-size uninterpreted hash type with 32 bytes (256 bits) size.
- Fixed-size uninterpreted hash type with 64 bytes (512 bits) size.
- Ethereum header definition.
- Partial header definition without ommers hash and transactions root.
- Proposal Header (40 bytes).
- Proposal Nonce (4 bytes).
- Proposal Target
ResourceId
(32 bytes). - An unsigned proposal represented in pallet storage We store the creation timestamp to purge expired proposals
- An unsigned proposal represented in pallet storage We store the creation timestamp to purge expired proposals
- Little-endian large integer type Unsigned 64-bit integer.
- Little-endian large integer type 128-bit unsigned integer.
- Little-endian large integer type 256-bit unsigned integer.
- Little-endian large integer type 512-bits unsigned integer.
Enums
- DecoderError for typed transactions.
- Conversion from decimal string error
- A list of error categories encountered when parsing numbers.
- Proposal enum
- Proposal kind enum
- Proposal Target Chain and its type (6 bytes).
Constants
- So long as the associated block id is within this tolerance, we consider the message as deliverable. This should be less than the SIGN_TIMEOUT
- Engine ID for DKG
- Authority set id starts with zero at genesis
- The keygen timeout limit in blocks before we consider misbehaviours
- Key type for DKG keys
- The sign timeout limit in blocks before we consider proposal as stalled
Traits
- Decodable typed transactions.
- Encodable typed transactions.
Functions
- Utility fn to calculate keccak 256
Type Definitions
- Max authorities
- Max size for keys
- Max proposals in a batch
- Max reporters
- Max resources to store onchain
- Max size for signatures
- Max size for vote proposal A vote consists of a new address, a leaf index, and a merkle proof [20 bytes, 4 bytes, 32 * HEIGHT bytes] If we want to support up to 1000 validators than the max vote length is 20 + 4 + 32 * 10 = 364 bytes or in bits 2912
- Max votes to store onchain
- The type used to represent an MMR root hash.
- Proposer vote type
- A typedef for keygen set / session id
- Signer set ID