Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9ace2a6
initial pull request | main functionality
Feb 23, 2026
5a974ec
complete functionality in processor
Feb 24, 2026
26a48e9
fix small compile error
Feb 24, 2026
94b27ea
all tests run correctly
Feb 25, 2026
52447b2
Merge branch 'master' into kuzmindev/feat/return-promise-as-they-proc…
Feb 25, 2026
b182951
compute service produce event with promise
Feb 25, 2026
9a27c72
Merge branch 'master' into kuzmindev/feat/return-promise-as-they-proc…
ecol-master Feb 25, 2026
3b9affb
only producer provides promises from compute service
Feb 25, 2026
bd3f009
small refactoring
Feb 26, 2026
e4f07c0
implement the builder for compute service
Feb 26, 2026
8414659
make compute service builder implementation much prettier
Feb 26, 2026
5829c5e
Merge branch 'master' into kuzmindev/feat/return-promise-as-they-proc…
Feb 26, 2026
a97cf4c
transfer promise for signing to consensus service
Feb 26, 2026
51ede2a
return tests in compute service
Feb 26, 2026
4d62e9a
redesign to PromisePolicy enum
Feb 26, 2026
08c8bae
Merge branch 'master' into kuzmindev/feat/return-promise-as-they-proc…
Feb 27, 2026
6b11846
refactoring inside ethexe/runtime | remove unresolved TODOs
Feb 27, 2026
7f9f46c
AnnouncePromisesStream inside compute service
Feb 27, 2026
9c01711
stabilize the AnnouncePromisesStream implementation
Mar 2, 2026
db7b81b
implement test with early break
Mar 2, 2026
b500072
Merge branch 'master' into kuzmindev/feat/return-promise-as-they-proc…
Mar 2, 2026
f19f762
fix clippy
Mar 2, 2026
c0d12ae
Merge branch 'master' into kuzmindev/feat/return-promise-as-they-proc…
ecol-master Mar 2, 2026
ba0df70
up limits for test
Mar 2, 2026
4095212
add guard for promise channel drop
Mar 3, 2026
d3ee89e
fix some dirty changes
Mar 3, 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
9 changes: 6 additions & 3 deletions Cargo.lock

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

15 changes: 14 additions & 1 deletion ethexe/common/src/gear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,20 @@ impl ToDigest for ValueClaim {
}
}

#[derive(Clone, Copy, Debug, Encode, Decode, PartialEq, Eq, Default, PartialOrd, Ord, Hash)]
#[derive(
Clone,
Copy,
Debug,
Encode,
Decode,
PartialEq,
Eq,
Default,
PartialOrd,
Ord,
Hash,
derive_more::IsVariant,
)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
pub enum MessageType {
#[default]
Expand Down
22 changes: 2 additions & 20 deletions ethexe/common/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
pub use tap::Tap;

use crate::{
Announce, BlockData, BlockHeader, CodeBlobInfo, ComputedAnnounce, Digest, HashOf,
ProgramStates, ProtocolTimelines, Schedule, SimpleBlockData, ValidatorsVec,
Announce, BlockData, BlockHeader, CodeBlobInfo, Digest, HashOf, ProgramStates,
ProtocolTimelines, Schedule, SimpleBlockData, ValidatorsVec,
consensus::BatchCommitmentValidationRequest,
db::*,
ecdsa::{PrivateKey, SignedMessage},
Expand Down Expand Up @@ -632,21 +632,3 @@ impl BlockData {
self
}
}

impl Mock for ComputedAnnounce {
fn mock(_: ()) -> Self {
Self {
announce_hash: HashOf::random(),
promises: Default::default(),
}
}
}

impl Mock<HashOf<Announce>> for ComputedAnnounce {
fn mock(announce_hash: HashOf<Announce>) -> Self {
Self {
announce_hash,
promises: Default::default(),
}
}
}
32 changes: 13 additions & 19 deletions ethexe/common/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.

use crate::{
DEFAULT_BLOCK_GAS_LIMIT, HashOf, ToDigest,
events::BlockEvent,
injected::{Promise, SignedInjectedTransaction},
DEFAULT_BLOCK_GAS_LIMIT, HashOf, ToDigest, events::BlockEvent,
injected::SignedInjectedTransaction,
};
use alloc::{
collections::{btree_map::BTreeMap, btree_set::BTreeSet},
Expand Down Expand Up @@ -130,24 +129,19 @@ impl ToDigest for Announce {
}
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ComputedAnnounce {
pub announce_hash: HashOf<Announce>,
pub promises: Vec<Promise>,
/// [`PromisePolicy`] tells processor whether should it emits promises or not.
#[derive(Clone, Debug, Copy, Default, PartialEq, Eq, Encode, Decode, derive_more::IsVariant)]
pub enum PromisePolicy {
/// Emits promises in execution process.
Enabled,
// Do not emit promises in execution process.
#[default]
Disabled,
}

impl ComputedAnnounce {
pub fn from_announce_hash(announce_hash: HashOf<Announce>) -> Self {
Self {
announce_hash,
promises: Default::default(),
}
}

pub fn merge_promises(&mut self, other: ComputedAnnounce) {
self.promises.extend(other.promises);
}
}
// Producer -> (announce, PromisePolicy::Enabled)
// Subordinate -> (announce, PromisePolicy::Disabled)
// ConnectNode -> (announce, PromisePolicy::Disabled)

#[derive(PartialEq, Eq, Hash, Debug, Clone, Copy, Default, Encode, Decode, TypeInfo)]
#[cfg_attr(feature = "std", derive(serde::Serialize))]
Expand Down
3 changes: 2 additions & 1 deletion ethexe/compute/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ wat.workspace = true
wasmparser.workspace = true
ethexe-common = { workspace = true, features = ["mock"] }
ntest.workspace = true

# test examples
demo-ping.workspace = true
Loading