oasis_core_runtime/consensus/
mod.rs1use crate::common::crypto::hash::Hash;
4
5pub mod address;
6pub mod beacon;
7pub mod governance;
8pub mod keymanager;
9pub mod registry;
10pub mod roothash;
11pub mod scheduler;
12pub mod staking;
13pub mod state;
14pub mod tendermint;
15pub mod transaction;
16pub mod verifier;
17
18pub const MODULE_NAME: &str = "consensus";
20
21pub const METHOD_META: &str = "consensus.Meta";
23
24pub const HEIGHT_LATEST: u64 = 0;
26
27#[derive(Clone, Default, Debug, cbor::Encode, cbor::Decode)]
29pub struct LightBlock {
30 pub height: u64,
31 pub meta: Vec<u8>,
32}
33
34#[derive(Clone, Debug, cbor::Encode, cbor::Decode)]
36pub enum Event {
37 #[cbor(rename = "staking")]
38 Staking(staking::Event),
39 }
41
42#[derive(Clone, Debug, Default, PartialEq, Eq, cbor::Encode, cbor::Decode)]
47pub struct BlockMetadata {
48 pub state_root: Hash,
50 pub events_root: Vec<u8>,
52}