Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
41a85ff
draft implementation
Feb 6, 2026
a1e405c
Merge branch 'master' into kuzmindev/feat/producer-send-promises-hashes
Feb 6, 2026
cc740d5
fix changes | final design
Feb 8, 2026
d4dd026
fix network tests
Feb 8, 2026
b7fab2d
Merge branch 'master' into kuzmindev/feat/producer-send-promises-hashes
Feb 9, 2026
9d788d3
fix format
Feb 9, 2026
a844855
redisign CompactSignedPromise
Feb 11, 2026
d8b64b8
Merge branch 'master' into kuzmindev/feat/producer-send-promises-hashes
Feb 11, 2026
ac2519e
remove Eip191Hash struct
Feb 11, 2026
dfaa7d1
fix unused deps | small refactoring in consensus
Feb 11, 2026
8c7829c
self review fixes
Feb 11, 2026
3afe82b
update submodules
Feb 12, 2026
e5c49ed
Merge branch 'master' into kuzmindev/feat/producer-send-promises-hashes
ecol-master Feb 12, 2026
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
f0cd844
self review small fixes
Mar 4, 2026
e2897ea
Merge branch 'master' into kuzmindev/feat/return-promise-as-they-proc…
ecol-master Mar 4, 2026
d1586f8
Merge branch 'master' into kuzmindev/feat/return-promise-as-they-proc…
ecol-master Mar 5, 2026
91e7802
fix for limited vec in injected transaction
Mar 5, 2026
0d19463
Merge branch 'kuzmindev/feat/return-promise-as-they-processed' into k…
Mar 6, 2026
e9d71b3
small redesign for CompactSignedPromise
Mar 6, 2026
78fa1bd
RPC redesign | PromiseEmissionMode
Mar 9, 2026
c79e07b
remove store promise in db from service to rpc
Mar 9, 2026
5d884e4
feat(ethexe/rpc): add method to get injected transaction (#5233)
osipov-mit Mar 19, 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
67 changes: 37 additions & 30 deletions Cargo.lock

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

22 changes: 22 additions & 0 deletions core/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@

use alloc::vec::Vec;
use gear_core_errors::ReplyCode;
use gprimitives::H256;
use parity_scale_codec::{Decode, Encode};
use scale_decode::DecodeAsType;
use scale_encode::EncodeAsType;
use scale_info::TypeInfo;

use crate::utils;

/// Pre-calculated gas consumption estimate for a message.
///
/// Intended to be used as a result in `calculateGasFor*` RPC calls.
Expand Down Expand Up @@ -65,6 +68,25 @@ pub struct ReplyInfo {
pub code: ReplyCode,
}

impl ReplyInfo {
/// Calculates `blake2b` hash from [`ReplyInfo`].
pub fn to_hash(&self) -> H256 {
let ReplyInfo {
payload,
value,
code,
} = self;

let bytes = [
payload.as_ref(),
value.to_be_bytes().as_ref(),
code.to_bytes().as_ref(),
]
.concat();
utils::hash(&bytes).into()
}
}

/// Serializer and deserializer for ReplyCode as 0x-prefixed hex string.
#[cfg(feature = "std")]
pub(crate) mod serialize_reply_code {
Expand Down
2 changes: 1 addition & 1 deletion ethexe/cli/src/commands/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ impl Checker {
.context("Unable to preparing announce data for execution")?;
let res = processor
.as_mut()
.process_programs(executable)
.process_programs(executable, None)
.await
.context("failed to re-compute announce")?;

Expand Down
19 changes: 17 additions & 2 deletions ethexe/common/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
//! 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,
injected::{InjectedTransaction, SignedInjectedTransaction},
injected::{InjectedTransaction, Promise, SignedInjectedTransaction},
};
use alloc::{
collections::{BTreeSet, VecDeque},
Expand All @@ -34,6 +34,7 @@ use gear_core::{
ids::{ActorId, CodeId},
};
use gprimitives::H256;
use gsigner::secp256k1::Signature;
use parity_scale_codec::{Decode, Encode};
use scale_info::TypeInfo;

Expand Down Expand Up @@ -135,11 +136,25 @@ pub trait InjectedStorageRO {
&self,
hash: HashOf<InjectedTransaction>,
) -> Option<SignedInjectedTransaction>;

/// Returns the promise by its transaction hash.
fn promise(&self, hash: HashOf<InjectedTransaction>) -> Option<Promise>;

fn promise_signature(&self, hash: HashOf<InjectedTransaction>) -> Option<(Signature, Address)>;
}

#[auto_impl::auto_impl(&)]
pub trait InjectedStorageRW: InjectedStorageRO {
fn set_injected_transaction(&self, tx: SignedInjectedTransaction);

fn set_promise(&self, promise: &Promise);

fn set_promise_signature(
&self,
hash: HashOf<InjectedTransaction>,
signature: Signature,
address: Address,
);
}

#[derive(Debug, Clone, Default, Encode, Decode, TypeInfo, PartialEq, Eq, Hash)]
Expand Down
Loading