feat(ethexe/rpc): add TxReceipt for injected transactions#5382
feat(ethexe/rpc): add TxReceipt for injected transactions#5382ecol-master wants to merge 12 commits into
Conversation
TxReceipt for injected transaction
611e511 to
1c6d9ec
Compare
Implemented: - generic Receipt<P> enum - types for receipts handling in RPC and other modules - receipt handling receipt across all ethexe services Removed: - SignedCompactPromise - replaced with SignedCompactTxReceipt
|
@claude review |
|
Claude finished @ecol-master's task in 2m 48s —— View job Code Review
OverviewThis PR replaces severity: high — File: When Same in severity: high — Network protocol break: gossipsub topic rename is silent File: The gossipsub topic is renamed from severity: medium — RPC method name still File: #[method(name = "getTransactionPromise")]
async fn get_transaction_receipt(The JSON-RPC wire name is unchanged while the Rust function was renamed. This silently preserves backward compatibility for existing callers, but the mismatch will confuse anyone reading the code. Either rename the wire method to severity: medium — File: pub fn variant_index(&self) -> u8 {
unsafe { (self as *const TransactionErrorReason).cast::<u8>().read() }
}Since the enum is severity: medium — Commented-out dead code in File: // #[from]
// PublishTransactionResult(SignedTransactionResult),Dead commented-out code in a public enum. Remove before merging or replace with a proper TODO if the variant is planned. severity: low — DB key gap skips 20, not 13/16 File:
severity: low — Typo in doc comment File:
Should be "It is used as a lightweight transfer type". severity: low — Debug format used for user-facing error message File: return Err(anyhow!("injected transaction failed: {err:?}"));
|
|
@claude review-delta |
|
Claude finished @ecol-master's task in 1m 1s —— View job Review DeltaReviewing commit What Was Fixed ✅
What Was Not Fixedseverity: high —
severity: high — Gossipsub topic rename still silently breaks mixed-version rollouts
severity: medium — File: The fix changed // Before (still unsafe, just different cast syntax):
unsafe { (self as *const TransactionErrorReason as *const u8).read() }
// Should be:
*self as u8Since |
There was a problem hiding this comment.
Code Review
This pull request refactors the injected transaction lifecycle in ethexe by replacing the "Promise" mechanism with a more comprehensive "Receipt" system. This change introduces a Receipt enum that can represent either a successful execution promise or a specific TransactionError, allowing validators to propagate execution failures to RPC subscribers and across the network. The implementation involves significant updates across the database, consensus, network, and RPC layers to support SignedTxReceipt and its compact version. Feedback was provided regarding the new unsafe constructor in the gsigner crate, suggesting the use of #[doc(hidden)] to discourage general use of this performance-oriented internal function.
|
Removing |
TxReceipt for injected transaction
@gear-tech/dev
Closes #5438