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, Default, Debug, cbor::Encode, cbor::Decode)]
36pub struct Validators {
37 pub height: u64,
38 pub meta: Vec<u8>,
39}
40
41#[derive(Clone, Debug, cbor::Encode, cbor::Decode)]
43pub enum Event {
44 #[cbor(rename = "staking")]
45 Staking(staking::Event),
46 }
48
49#[derive(Clone, Debug, Default, PartialEq, Eq, cbor::Encode, cbor::Decode)]
54pub struct BlockMetadata {
55 pub state_root: Hash,
57 pub events_root: Vec<u8>,
59}