sov_rollup_interface/state_machine/
mod.rs

1//! Defines types, traits, and helpers that are used by the core state-machine of the rollup.
2//! Items in this module must be fully deterministic, since they are expected to be executed inside of zkVMs.
3pub mod crypto;
4pub mod da;
5pub mod stf;
6pub mod zk;
7
8pub use bytes::{Buf, BufMut, Bytes, BytesMut};
9use serde::de::DeserializeOwned;
10use serde::Serialize;
11
12#[cfg(feature = "mocks")]
13pub mod mocks;
14
15pub mod optimistic;
16
17/// A marker trait for general addresses.
18pub trait BasicAddress:
19    Eq
20    + PartialEq
21    + core::fmt::Debug
22    + core::fmt::Display
23    + Send
24    + Sync
25    + Clone
26    + std::hash::Hash
27    + AsRef<[u8]>
28    + for<'a> TryFrom<&'a [u8], Error = anyhow::Error>
29    + std::str::FromStr
30    + Serialize
31    + DeserializeOwned
32    + 'static
33{
34}
35
36/// An address used inside rollup
37pub trait RollupAddress: BasicAddress + From<[u8; 32]> {}