Skip to content

Conversation

@Lazark0x
Copy link
Member

No description provided.

ark0f and others added 30 commits November 1, 2025 16:46
…-offchain-tx

# Conflicts:
#	ethexe/service/src/lib.rs
@Lazark0x Lazark0x self-assigned this Nov 13, 2025
@semanticdiff-com
Copy link

semanticdiff-com bot commented Nov 13, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  ethexe/network/src/db_sync/mod.rs  90% smaller
  ethexe/consensus/src/announces.rs  75% smaller
  ethexe/ethereum/src/mirror/mod.rs  74% smaller
  ethexe/consensus/src/validator/initial.rs  65% smaller
  ethexe/service/src/tests/mod.rs  59% smaller
  ethexe/consensus/src/validator/producer.rs  59% smaller
  ethexe/consensus/src/connect/mod.rs  59% smaller
  ethexe/processor/src/handling/mod.rs  59% smaller
  ethexe/consensus/src/tx_validation.rs  30% smaller
  ethexe/network/src/db_sync/responses.rs  26% smaller
  ethexe/common/src/network.rs  15% smaller
  ethexe/processor/src/lib.rs  13% smaller
  ethexe/consensus/src/validator/subordinate.rs  13% smaller
  ethexe/common/src/primitives.rs  12% smaller
  ethexe/common/src/consensus.rs  5% smaller
  ethexe/common/src/mock.rs  1% smaller
  ethexe/common/Cargo.toml Unsupported file format
  ethexe/common/src/db.rs  0% smaller
  ethexe/common/src/gear.rs  0% smaller
  ethexe/common/src/injected.rs  0% smaller
  ethexe/consensus/src/validator/tx_pool.rs  0% smaller
  ethexe/db/src/verifier.rs  0% smaller
  ethexe/network/src/validator/topic.rs  0% smaller
  ethexe/processor/src/tests.rs  0% smaller
  ethexe/service/src/fast_sync.rs Unsupported file format

Dmitry Kuzmin and others added 11 commits November 14, 2025 14:30
…x' into laz/ethexe/3-blocks/network-announce

# Conflicts:
#	ethexe/consensus/src/validator/producer.rs
#	ethexe/consensus/src/validator/subordinate.rs
#	ethexe/consensus/src/validator/tx_pool.rs
#	ethexe/db/src/database.rs
#	ethexe/network/src/db_sync/responses.rs
#	ethexe/processor/src/handling/mod.rs
#	ethexe/processor/src/lib.rs
…x' into laz/ethexe/3-blocks/network-announce

# Conflicts:
#	ethexe/processor/src/lib.rs
Base automatically changed from kuzmindev/feat/handle-injected-tx to master November 17, 2025 18:18
Lazark0x and others added 12 commits November 17, 2025 19:24
…/network-announce

# Conflicts:
#	core/src/rpc.rs
#	ethexe/common/src/db.rs
#	ethexe/common/src/injected.rs
#	ethexe/common/src/primitives.rs
#	ethexe/consensus/src/connect/mod.rs
#	ethexe/consensus/src/lib.rs
#	ethexe/consensus/src/validator/producer.rs
#	ethexe/consensus/src/validator/subordinate.rs
#	ethexe/consensus/src/validator/tx_pool.rs
#	ethexe/db/src/database.rs
#	ethexe/db/src/verifier.rs
#	ethexe/processor/src/handling/mod.rs
#	ethexe/processor/src/lib.rs
#	ethexe/rpc/Cargo.toml
#	ethexe/rpc/src/test_utils.rs
#	ethexe/service/src/lib.rs
#	ethexe/service/src/tests/mod.rs
…/network-announce

# Conflicts:
#	ethexe/common/src/network.rs
#	ethexe/consensus/src/connect/mod.rs
#	ethexe/consensus/src/validator/producer.rs
#	ethexe/consensus/src/validator/subordinate.rs
#	ethexe/consensus/src/validator/tx_pool.rs
#	ethexe/network/src/db_sync/responses.rs
#	ethexe/processor/src/tests.rs
#	ethexe/service/src/lib.rs
#	ethexe/service/src/tests/mod.rs
…/network-announce

# Conflicts:
#	ethexe/network/src/validator/topic.rs
#	ethexe/service/src/fast_sync.rs
#	ethexe/service/src/tests/mod.rs
…/network-announce

# Conflicts:
#	ethexe/common/src/injected.rs
#	ethexe/consensus/src/tx_validation.rs
#	ethexe/consensus/src/validator/producer.rs
#	ethexe/consensus/src/validator/tx_pool.rs
#	ethexe/network/src/validator/topic.rs
#	ethexe/service/src/tests/mod.rs
@Lazark0x Lazark0x added A0-pleasereview PR is ready to be reviewed by the team D8-ethexe ethexe-related PR labels Dec 18, 2025
}
}

impl NetworkAnnounce {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pls add comments to differences in methods announce_hash and to_hash?
Or maybe should remove announce_hash method to avoid possible future errors connected with hashing

std = [
"nonempty/std",
"gear-core/std",
"sp-core/std",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already exists, pls remove this line

}
}

impl ToDigest for NetworkAnnounce {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I am not sure about this implementation. And I am not sure, that we need it

let tx_hash = tx.data().to_hash();
for tx_hash in announce.injected_transactions.iter() {
let Some(tx) = self.ctx.core.db.injected_transaction(*tx_hash) else {
tracing::warn!(?tx_hash, "Not found injected transaction body");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls use here

tracing::warn!(%tx_hash, "Not found injected transaction body");

let Some(promise) = self.ctx.core.db.promise(tx_hash) else {
tracing::warn!(tx_hash = ?tx_hash, "Not found promise for injected transaction");
let Some(promise) = self.ctx.core.db.promise(tx.data().to_hash()) else {
tracing::warn!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls use here:

tracing::warn!(tx_hash = %tx.data().to_hash(), "Not found promise for injected transaction");

let mut outdated_txs = vec![];

for (reference_block, tx_hash) in self.inner.iter() {
let Some(tx) = self.db.injected_transaction(*tx_hash) else {
Copy link
Member

@ecol-master ecol-master Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls remove this. You will get full tx body in TxValidityChecker, so it is a unnecessary db query.

match tx_checker.check_tx_validity(&tx)? {
match tx_checker.check_tx_validity(tx_hash)? {
TxValidity::Valid => {
tracing::trace!(tx_hash = ?tx_hash, tx = ?tx.data(), "tx is valid, including to announce");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove pls here tx = ?tx.data(), we don't need to log here a full tx data, the hash is enough

mem::take(chain),
self.commitment_delay_limit,
announces.into_iter().map(|a| (a.to_hash(), a)).collect(),
announces
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we set injected transactions in database when receive result from db_sync?

.1
.into_iter()
.map(|a| (a.to_hash(), a))
.map(|a| {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here I am not sure now that we save transactions to database

AnnounceNotFound(HashOf<Announce>),
AnnounceIsNotComputed(HashOf<Announce>),
AnnounceIsNotIncluded(HashOf<Announce>),
AnnounceOffChainTransactionsNotEmpty(HashOf<Announce>),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a good one
I can no understand why we have this error variant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A0-pleasereview PR is ready to be reviewed by the team D8-ethexe ethexe-related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants