griffin_core/lib.rs
1//! This crate contains all the fundamental building blocks for the Griffin
2//! ledger, runtime, and wallet.
3//!
4//! It was initially based on
5//! [tuxedo_core](https://off-narrative-labs.github.io/Tuxedo/tuxedo_core/index.html),
6//! and it now includes a clone of six crates from the
7//! [Pallas](https://github.com/txpipe/pallas) suite, with modifications in
8//! order to be used in a `no-std` setting.
9//!
10//! The Core main purpose is to bring the Griffin node to life. The node is
11//! based on Substrate / Polkadot SDK, and the instructions to make it run can
12//! be found
13//! [here](https://github.com/txpipe/griffin/tree/main?tab=readme-ov-file#griffin).
14
15#![cfg_attr(not(feature = "std"), no_std)]
16
17#[macro_use]
18extern crate alloc;
19
20mod executive;
21
22pub mod checks_interface;
23pub mod genesis;
24pub mod h224;
25pub mod pallas_addresses;
26pub mod pallas_applying;
27pub mod pallas_codec;
28pub mod pallas_crypto;
29pub mod pallas_interface;
30pub mod pallas_primitives;
31pub mod pallas_traverse;
32pub mod support_macros;
33pub mod types;
34pub mod uplc;
35use h224::H224;
36pub mod utxo_set;
37pub use executive::Executive;
38
39/// A Griffin-specific target for diagnostic node log messages
40const LOG_TARGET: &str = "griffin-core";
41
42/// A transient storage key that will hold the partial header while a block is being built.
43/// This key is cleared before the end of the block.
44const HEADER_KEY: &[u8] = b"header";
45
46/// A storage key that will store the block height during and after execution.
47/// This allows the block number to be available in the runtime even during off-chain api calls.
48pub const HEIGHT_KEY: &[u8] = b"height";
49
50/// A transient storage key that will hold the list of extrinsics that have been applied so far.
51/// This key is cleared before the end of the block.
52pub const EXTRINSIC_KEY: &[u8] = b"extrinsics";