Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
7782dc5
refactor chain commitment aggregation - pre-commit PASSED
grishasobol Dec 4, 2025
bffa168
fix validators errors handling
grishasobol Dec 5, 2025
d62f220
fix era timestamps
grishasobol Dec 5, 2025
ecc3b20
remove validation deepness limit completelly
grishasobol Dec 5, 2025
d6a2523
move latest_era_with_committed_validators to PreparedBlockData
grishasobol Dec 5, 2025
3aa82cb
issues
grishasobol Dec 5, 2025
986792c
fix election_timestamp_finalized
grishasobol Dec 5, 2025
5a22feb
processor refactoring
grishasobol Dec 19, 2025
2aaeddf
PASS ethexe-processor tests
grishasobol Dec 19, 2025
19e7ca0
Merge branch 'master' into gsobol/ethexe/consensus-errors-handling
grishasobol Dec 22, 2025
8a786f9
fix; tests PASSED
grishasobol Dec 22, 2025
03f1cd6
fix
grishasobol Dec 22, 2025
402b05b
refactoring
grishasobol Dec 22, 2025
defb909
Merge branch 'master' into gsobol/ethexe/processor
grishasobol Dec 23, 2025
1497fee
uncomment db tests
grishasobol Dec 23, 2025
4184530
remove multiplier from rpc config
grishasobol Dec 23, 2025
72d1833
pretty printing
grishasobol Dec 23, 2025
8b729dd
process queue remove Option; remove async run from RunContext
grishasobol Dec 23, 2025
e2b4ea4
borrow inner
grishasobol Dec 23, 2025
fcbfa5d
move OverlaidRunContext to overlaid.rs
grishasobol Dec 23, 2025
b510f30
use move semantic for transitions in run context
grishasobol Dec 23, 2025
068cc60
fix test injected_prioritized_over_canonical
grishasobol Dec 23, 2025
2758f8b
return error from run
grishasobol Dec 23, 2025
fc3ac90
return cloneable back
grishasobol Dec 23, 2025
f8b4907
fix network tests
grishasobol Dec 24, 2025
440bd2d
Merge branch 'gsobol/ethexe/processor' into gsobol/ethexe/db
grishasobol Dec 24, 2025
be4d72e
fix after merge
grishasobol Dec 24, 2025
26d7103
improve key to_bytes
grishasobol Dec 24, 2025
5d94873
remove redandant write_hash and contains
grishasobol Dec 24, 2025
7d1b775
intermidiate
grishasobol Jan 13, 2026
421cab7
Merge branch 'master' into gsobol/ethexe/processor
grishasobol Jan 20, 2026
0a007d7
fixes after master merge
grishasobol Jan 20, 2026
736ea46
Merge branch 'gsobol/ethexe/processor' into gsobol/ethexe/db
grishasobol Jan 20, 2026
a2ffffc
Merge branch 'master' into gsobol/ethexe/db
grishasobol Jan 20, 2026
55aafc0
inermediate 1
grishasobol Jan 21, 2026
7f7cf81
Merge branch 'master' into gsobol/ethexe/processor
grishasobol Jan 29, 2026
5c5e831
fix for shear
grishasobol Jan 29, 2026
613bd02
fix(ethexe-processor): use a dedicated thread pool for chunked execut…
liferooter Jan 12, 2026
d96cbdb
DEFAULT_CHUNK_PROCESSING_THREADS -> DEFAULT_CHUNK_SIZE
grishasobol Jan 29, 2026
09d4409
check pub(super/crate/none) correctness
grishasobol Jan 30, 2026
75550bf
append issue number
grishasobol Jan 30, 2026
4840960
move task processing to after queue processing
grishasobol Jan 30, 2026
cff516a
Merge branch 'master' into gsobol/ethexe/processor
grishasobol Jan 30, 2026
8598b21
Merge branch 'master' into gsobol/ethexe/processor
grishasobol Feb 4, 2026
545d145
Merge branch 'master' into gsobol/ethexe/processor
grishasobol Feb 5, 2026
87908f9
review
grishasobol Feb 5, 2026
4ad7c31
Merge branch 'gsobol/ethexe/processor' into gsobol/ethexe/db
grishasobol Feb 5, 2026
72a160f
some fixes
grishasobol Feb 6, 2026
9a28d71
support pending announces rejection in connect node
grishasobol Feb 6, 2026
b99fa7c
fixes
grishasobol Feb 7, 2026
0769ad4
Merge branch 'gsobol/ethexe/connect-node-fix' into gsobol/ethexe/db
grishasobol Feb 7, 2026
c6261e5
fix some bugs in tests
grishasobol Feb 7, 2026
334431e
Merge branch 'master' into gsobol/ethexe/db
grishasobol Feb 7, 2026
1414214
restructure
grishasobol Feb 8, 2026
50a582c
issue number
grishasobol Feb 8, 2026
eeb9ef9
Merge branch 'master' into gsobol/ethexe/db
grishasobol Feb 11, 2026
6395017
update submodules
grishasobol Feb 11, 2026
21e4bdc
fix clippy
grishasobol Feb 11, 2026
10f876c
append licence
grishasobol Feb 11, 2026
6f4784b
Merge branch 'master' into gsobol/ethexe/db
grishasobol Feb 12, 2026
986a948
fix after master merge
grishasobol Feb 12, 2026
312054a
fix for shear
grishasobol Feb 12, 2026
f2bd20a
remove redundant
grishasobol Feb 12, 2026
8b3e4e0
Merge branch 'master' into gsobol/ethexe/db
grishasobol Feb 25, 2026
b473cf6
fix after master merge
grishasobol Feb 25, 2026
f78a691
Merge branch 'master' into gsobol/ethexe/db
grishasobol Feb 25, 2026
8ef8dda
fix redundant deps
grishasobol Feb 25, 2026
3c9f2d6
Merge branch 'master' into gsobol/ethexe/db
grishasobol Feb 25, 2026
06da604
return sha2 dep back
grishasobol Feb 26, 2026
6f97fe8
Merge branch 'master' into gsobol/ethexe/db
grishasobol Feb 26, 2026
b731057
fix observer doc
grishasobol Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ utils/**/fuzz/fuzz/*
fuzz_run
lazy_pages_fuzz_run
seed.bin
.vscode/settings.json
19 changes: 18 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ members = [
"ethexe/*",
"ethexe/runtime/common",
"ethexe/service/utils",
"ethexe/db/init",
]

[workspace.dependencies]
Expand Down Expand Up @@ -332,6 +333,7 @@ ethexe-rpc = { path = "ethexe/rpc", default-features = false }
ethexe-common = { path = "ethexe/common", default-features = false }
ethexe-compute = { path = "ethexe/compute", default-features = false }
ethexe-blob-loader = { path = "ethexe/blob-loader", default-features = false }
ethexe-db-init = { path = "ethexe/db/init", default-features = false }

# Common executor between `sandbox-host` and `lazy-pages-fuzzer`
wasmi = { version = "0.38" }
Expand Down Expand Up @@ -592,6 +594,7 @@ ignored = [
"pallet-authorship",
"pallet-timestamp",
"sp-application-crypto",
"ethexe-sdk",
]

[profile.dev.package.corosensei]
Expand Down
3 changes: 0 additions & 3 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ serde = { workspace = true, features = ["derive"], optional = true }
impl-serde = { workspace = true, optional = true }
gear-workspace-hack.workspace = true

[package.metadata.cargo-shear]
ignored = ["impl-serde"]

[dev-dependencies]
tracing-subscriber.workspace = true
wat.workspace = true
Expand Down
20 changes: 9 additions & 11 deletions ethexe/cli/src/commands/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use anyhow::{Context, Result, anyhow, ensure};
use clap::Parser;
use ethexe_common::{
Announce, HashOf, SimpleBlockData,
db::{AnnounceStorageRO, LatestData, LatestDataStorageRO, OnChainStorageRO},
db::{AnnounceStorageRO, DBGlobals, GlobalsStorageRO, OnChainStorageRO},
};
use ethexe_db::{
Database, RocksDatabase,
Expand Down Expand Up @@ -81,15 +81,13 @@ impl CheckCommand {
}

let rocks_db = RocksDatabase::open(self.db).context("failed to open rocks database")?;
let db = Database::from_one(&rocks_db);
let db = Database::from_one(&rocks_db)?;

let latest_data = db
.latest_data()
.ok_or_else(|| anyhow!("no latest data found in db"))?;
let globals = db.globals().clone();

let checker = Checker {
db,
latest_data,
globals,
progress_bar: !self.verbose,
chunk_size: self.chunk_size,
canonical_quarantine: self.canonical_quarantine,
Expand All @@ -116,7 +114,7 @@ impl CheckCommand {
#[derive(Clone)]
struct Checker {
db: Database,
latest_data: LatestData,
globals: DBGlobals,
progress_bar: bool,
chunk_size: usize,
canonical_quarantine: u8,
Expand All @@ -125,8 +123,8 @@ struct Checker {
impl Checker {
async fn integrity_check(&self) -> Result<()> {
let db = &self.db;
let bottom = self.latest_data.start_block_hash;
let head = self.latest_data.synced_block.hash;
let bottom = self.globals.start_block_hash;
let head = self.globals.latest_synced_block.hash;

let bottom = db
.block_header(bottom)
Expand Down Expand Up @@ -199,8 +197,8 @@ impl Checker {

async fn computation_check(&self) -> Result<()> {
let db = &self.db;
let bottom = self.latest_data.start_announce_hash;
let head = self.latest_data.computed_announce_hash;
let bottom = self.globals.start_announce_hash;
let head = self.globals.latest_computed_announce_hash;
let progress_bar = self.progress_bar;
let chunk_size = self.chunk_size;
let canonical_quarantine = self.canonical_quarantine;
Expand Down
102 changes: 62 additions & 40 deletions ethexe/common/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! Common db types and traits.

use crate::{
Announce, BlockHeader, CodeBlobInfo, Digest, HashOf, ProgramStates, ProtocolTimelines,
Address, Announce, BlockHeader, CodeBlobInfo, Digest, HashOf, ProgramStates, ProtocolTimelines,
Schedule, SimpleBlockData, ValidatorsVec,
events::BlockEvent,
gear::StateTransition,
Expand Down Expand Up @@ -113,15 +113,13 @@ pub trait OnChainStorageRO {
fn validators(&self, era_index: u64) -> Option<ValidatorsVec>;
// TODO kuzmindev: temporal solution - must move into block meta or something else.
fn block_validators_committed_for_era(&self, block_hash: H256) -> Option<u64>;
fn protocol_timelines(&self) -> Option<ProtocolTimelines>;
}

#[auto_impl::auto_impl(&)]
pub trait OnChainStorageRW: OnChainStorageRO {
fn set_block_header(&self, block_hash: H256, header: BlockHeader);
fn set_block_events(&self, block_hash: H256, events: &[BlockEvent]);
fn set_code_blob_info(&self, code_id: CodeId, code_info: CodeBlobInfo);
fn set_protocol_timelines(&self, timelines: ProtocolTimelines);
fn set_validators(&self, era_index: u64, validator_set: ValidatorsVec);
fn set_block_validators_committed_for_era(&self, block_hash: H256, era_index: u64);
fn set_block_synced(&self, block_hash: H256);
Expand Down Expand Up @@ -173,43 +171,6 @@ pub trait AnnounceStorageRW: AnnounceStorageRO {
);
}

#[derive(Debug, Clone, Default, Encode, Decode, PartialEq, Eq)]
pub struct LatestData {
/// Latest synced block
pub synced_block: SimpleBlockData,
/// Latest prepared block hash
pub prepared_block_hash: H256,
/// Latest computed announce hash
pub computed_announce_hash: HashOf<Announce>,
/// Genesis block hash
pub genesis_block_hash: H256,
/// Genesis announce hash
pub genesis_announce_hash: HashOf<Announce>,
/// Start block hash: genesis or defined by fast-sync
pub start_block_hash: H256,
/// Start announce hash: genesis or defined by fast-sync
pub start_announce_hash: HashOf<Announce>,
}

#[auto_impl::auto_impl(&, Box)]
pub trait LatestDataStorageRO {
fn latest_data(&self) -> Option<LatestData>;
}

#[auto_impl::auto_impl(&)]
pub trait LatestDataStorageRW: LatestDataStorageRO {
fn set_latest_data(&self, data: LatestData);
fn mutate_latest_data(&self, f: impl FnOnce(&mut LatestData)) -> Option<()> {
if let Some(mut latest_data) = self.latest_data() {
f(&mut latest_data);
self.set_latest_data(latest_data);
Some(())
} else {
None
}
}
}

pub struct PreparedBlockData {
pub header: BlockHeader,
pub events: Vec<BlockEvent>,
Expand All @@ -226,3 +187,64 @@ pub struct ComputedAnnounceData {
pub outcome: Vec<StateTransition>,
pub schedule: Schedule,
}

#[derive(Debug, Clone, Encode, Decode, PartialEq, Eq)]
pub struct DBConfig {
pub version: u32,
pub chain_id: u64,
pub router_address: Address,
pub timelines: ProtocolTimelines,
pub genesis_block_hash: H256,
pub genesis_announce_hash: HashOf<Announce>,
}

#[derive(Debug, Clone, Encode, Decode, PartialEq, Eq)]
pub struct DBGlobals {
pub start_block_hash: H256,
pub start_announce_hash: HashOf<Announce>,
pub latest_synced_block: SimpleBlockData,
pub latest_prepared_block_hash: H256,
pub latest_computed_announce_hash: HashOf<Announce>,
}

#[cfg(feature = "std")]
mod std_interfaces {
use super::{DBConfig, DBGlobals};
use std::sync::RwLockReadGuard;

#[auto_impl::auto_impl(&, Box)]
pub trait GlobalsStorageRO {
fn globals(&self) -> RwLockReadGuard<'_, DBGlobals>;
}

#[auto_impl::auto_impl(&, Box)]
pub trait GlobalsStorageRW: GlobalsStorageRO {
fn globals_mutate<R>(&self, f: impl FnMut(&mut DBGlobals) -> R) -> R;
}

#[auto_impl::auto_impl(&, Box)]
pub trait ConfigStorageRO {
fn config(&self) -> RwLockReadGuard<'_, DBConfig>;
}
}

#[cfg(feature = "std")]
pub use std_interfaces::{ConfigStorageRO, GlobalsStorageRO, GlobalsStorageRW};

#[cfg(feature = "mock")]
mod mock_interfaces {
use super::{DBConfig, DBGlobals};

#[auto_impl::auto_impl(&, Box)]
pub trait SetGlobals {
fn set_globals(&self, globals: DBGlobals);
}

#[auto_impl::auto_impl(&, Box)]
pub trait SetConfig {
fn set_config(&self, config: DBConfig);
}
}

#[cfg(feature = "mock")]
pub use mock_interfaces::{SetConfig, SetGlobals};
7 changes: 7 additions & 0 deletions ethexe/common/src/gear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,3 +436,10 @@ pub enum MessageType {
Canonical,
Injected,
}

#[derive(Debug)]
pub struct GenesisBlockInfo {
pub hash: H256,
pub number: u32,
pub timestamp: u64,
}
8 changes: 7 additions & 1 deletion ethexe/common/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ impl<T> Hash for HashOf<T> {
}
}

impl<T> AsRef<[u8]> for HashOf<T> {
fn as_ref(&self) -> &[u8] {
self.hash.as_ref()
}
}

impl<T> HashOf<T> {
/// # Safety
/// Use it only for low-level storage implementations or tests.
Expand All @@ -116,7 +122,7 @@ impl<T> HashOf<T> {
}
}

#[cfg(feature = "std")]
#[cfg(feature = "mock")]
pub fn random() -> Self {
Self {
hash: H256::random(),
Expand Down
Loading