Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
c59960d
revive: Implement latest tx type
lexnv Aug 21, 2025
c23e01f
revive: Implement signature type
lexnv Aug 21, 2025
2420206
revive: Implement Encode and Decode
lexnv Aug 21, 2025
efffc74
revive: Fixes and testing cases
lexnv Aug 21, 2025
2d02c96
revive/block: Ensure ETH block hash is identical
lexnv Aug 21, 2025
fa02002
revive/tests: Add tests assets with receipt and blocks
lexnv Aug 21, 2025
a788255
revive: Add requests_hash to the ethereum block for decoding
lexnv Aug 21, 2025
b7d3de5
revive: Fetch the type of the transaction
lexnv Aug 22, 2025
20d8b0b
revive/exec: Fall back to system block hashes
lexnv Aug 22, 2025
aab1cd9
revive/tests: Add tests with real block hashes
lexnv Aug 22, 2025
e54b3ea
revive/tests: Remove commented code
lexnv Aug 22, 2025
e0fa53a
Merge remote-tracking branch 'origin/lexnv/minimal-poc-block-storage'…
lexnv Aug 26, 2025
f58a71b
revive/fix: Fix 7702 encoding to valid addresses
lexnv Aug 26, 2025
a8fe6b2
revive/tests: Remove debug code
lexnv Aug 26, 2025
9e2b928
revive: Compute the diff of space for HB incremental build
lexnv Aug 26, 2025
a441265
revive: Add incremental hash builder
lexnv Aug 26, 2025
9383ef8
frame: Remove commented code
lexnv Aug 27, 2025
816375a
revive: Introduce incremental hash builder
lexnv Aug 27, 2025
49a7a24
revive: Make the hash builder API generic
lexnv Aug 27, 2025
6c8520a
revive: Implement an incremental block builder approach
lexnv Aug 27, 2025
47e2b7c
revive: Use global variables to handle incremental building
lexnv Aug 27, 2025
2cf3054
revive: Use SafeGlobal with RefCell instead of spin mutex
lexnv Aug 27, 2025
3037698
revive/tests: Comment out prev tests that relied on storage items
lexnv Aug 27, 2025
1b91b28
revive: Add incremental receipt RLP builder
lexnv Aug 28, 2025
e49facc
revive: Add metrics and documentation for inncremental builder
lexnv Aug 28, 2025
9dcf59c
hash: Add serailized intermediate representation of builder
lexnv Sep 2, 2025
60080a9
hash: Add scale-encodable bloom wrapper
lexnv Sep 2, 2025
0955d49
hash: Add type info for the bloom wrapper
lexnv Sep 2, 2025
feaabc0
hash: Add IR for block builder
lexnv Sep 2, 2025
3219183
hash: Simplify the storage of block builder
lexnv Sep 2, 2025
d505da3
hash: Return receipt info and remove bloom wrapper
lexnv Sep 2, 2025
ebde141
revive: Add AccumulateReceipt as environmental and refactor block
lexnv Sep 2, 2025
1ce3cd9
revive: Remove logs from SafeGlobal
lexnv Sep 2, 2025
8fda911
revive: Place eth block builder IR into storage
lexnv Sep 2, 2025
b1442c8
revive/hash: Disable captured metrics
lexnv Sep 2, 2025
3c3dab4
revive: Remove unneeded structures
lexnv Sep 2, 2025
78cf4f0
revive/tests: Adjust testing to incremental builder
lexnv Sep 2, 2025
88448b8
revive: Serialize and deserialize block builder into storage
lexnv Sep 2, 2025
87fba1d
revive: Use let Some syntax
lexnv Sep 2, 2025
5b32cba
revive/tests: Fix unused import
lexnv Sep 2, 2025
8422dba
revive: Use &zero ref
lexnv Sep 2, 2025
044777a
revive: Make adjust_index_for_rlp private
lexnv Sep 2, 2025
75f25a9
revive: Remove eth events from storage
lexnv Sep 2, 2025
959ea5c
revive: Fix clippy
lexnv Sep 2, 2025
36238d0
revive: Fix incremental hashing order
lexnv Sep 3, 2025
ff25a39
revive/tests: Add tests for incremental hasher
lexnv Sep 3, 2025
8890944
revive/tests: Ensre RLP ordering compatibility
lexnv Sep 3, 2025
9bd2168
revive: Add docs for eth block storage
lexnv Sep 3, 2025
1068dbc
revive/hash: Capture receipt info events
lexnv Sep 3, 2025
cfee920
revive/hash: Fix URL in docs
lexnv Sep 3, 2025
6c87c10
revive: Add comments around receipt details
lexnv Sep 3, 2025
a93fc82
revive/tests: Ensure builder captures trie root of eth tx
lexnv Sep 3, 2025
c7b14e0
revive/tests: Ensure events are properly captured
lexnv Sep 3, 2025
d209d87
revive/tests: Fix captured events test to use proper address
lexnv Sep 3, 2025
b230c17
revive: Update chain metadata
lexnv Sep 4, 2025
f59b4ce
revive: Force Subxt to use version 15 for metadata fetching
lexnv Sep 4, 2025
975db1e
rpc: Substitute transaction signed object
lexnv Sep 4, 2025
3867acd
revive/rpc: Adjust send_raw_transaction to use signed transactions
lexnv Sep 4, 2025
b536660
revive: Fix cargo formatting
lexnv Sep 4, 2025
b43568a
revive: Add manual RLP encoding for logs
lexnv Sep 5, 2025
7ca4f68
revive: Implement manual LogsBloom and log encoding
lexnv Sep 5, 2025
f7da868
revive: Remove event log struct
lexnv Sep 5, 2025
dcd9341
revive: Ensure dry run uses proper gas to report usage
lexnv Sep 5, 2025
3801510
Revert "revive/rpc: Adjust send_raw_transaction to use signed transac…
lexnv Sep 16, 2025
209a248
pvm: Bound the number of emitted events to 512 per call
lexnv Sep 17, 2025
16cbc1c
revive/rpc: Ensure raw tx turns bytes into signed tx
lexnv Sep 17, 2025
208c552
revive: Update substrate chain metadata
lexnv Sep 17, 2025
48b1ceb
revive: Fix clippy
lexnv Sep 17, 2025
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
14 changes: 14 additions & 0 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion substrate/frame/revive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
alloy-consensus = { workspace = true, default-features = false }
alloy-core = { workspace = true, features = ["sol-types"] }
alloy-core = { workspace = true, features = ["sol-types", "rlp"] }
alloy-rlp = { version = "0.3.12", default-features = false }
codec = { features = ["derive", "max-encoded-len"], workspace = true }
derive_more = { workspace = true, features = ["from", "try_into"] }
environmental = { workspace = true }
Expand Down Expand Up @@ -63,6 +64,7 @@ sp-version = { workspace = true }
subxt-signer = { workspace = true, optional = true, features = ["unstable-eth"] }

[dev-dependencies]
alloy-consensus = { workspace = true, features = ["serde"] }
array-bytes = { workspace = true, default-features = true }
assert_matches = { workspace = true }
pretty_assertions = { workspace = true }
Expand Down
Binary file modified substrate/frame/revive/rpc/revive_chain.metadata
Binary file not shown.
11 changes: 10 additions & 1 deletion substrate/frame/revive/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,16 @@ impl EthRpcServer for EthRpcServerImpl {

async fn send_raw_transaction(&self, transaction: Bytes) -> RpcResult<H256> {
let hash = H256(keccak_256(&transaction.0));
let call = subxt_client::tx().revive().eth_transact(transaction.0);

let transaction = match TransactionSigned::decode(&transaction.0) {
Ok(tx) => tx,
Err(err) => {
log::debug!(target: LOG_TARGET, "Failed to decode transaction: {err:?}");
return Err(EthRpcError::RlpError(err).into());
},
};

let call = subxt_client::tx().revive().eth_transact(subxt::utils::Static(transaction));
self.client.submit(call).await.map_err(|err| {
log::debug!(target: LOG_TARGET, "submit call failed: {err:?}");
err
Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/revive/rpc/src/receipt_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ impl ReceiptExtractor {
.inspect_err(
|err| log::debug!(target: LOG_TARGET, "TransactionFeePaid not found in events for block {block_number}\n{err:?}")
)?;
let transaction_hash = H256(keccak_256(&call.payload));

let signed_tx =
TransactionSigned::decode(&call.payload).map_err(|_| ClientError::TxDecodingFailed)?;
let signed_tx = call.signed_transaction.0;
let transaction_hash = H256(keccak_256(&signed_tx.signed_payload()));

let from = signed_tx.recover_eth_address().map_err(|_| {
log::error!(target: LOG_TARGET, "Failed to recover eth address from signed tx");
ClientError::RecoverEthAddressFailed
Expand Down
4 changes: 4 additions & 0 deletions substrate/frame/revive/rpc/src/subxt_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ pub use subxt::config::PolkadotConfig as SrcChainConfig;
path = "pallet_revive::evm::api::rpc_types_gen::GenericTransaction",
with = "::subxt::utils::Static<::pallet_revive::evm::GenericTransaction>"
),
substitute_type(
path = "pallet_revive::evm::api::rpc_types_gen::TransactionSigned",
with = "::subxt::utils::Static<::pallet_revive::evm::TransactionSigned>"
),
substitute_type(
path = "pallet_revive::primitives::EthTransactInfo<B>",
with = "::subxt::utils::Static<::pallet_revive::EthTransactInfo<B>>"
Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/revive/src/evm/api/rpc_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ impl GenericTransaction {
input: tx.input.into(),
nonce: Some(tx.nonce),
value: Some(tx.value),
to: tx.to,
to: Some(tx.to),
gas: Some(tx.gas),
gas_price: Some(
base_gas_price
Expand Down Expand Up @@ -366,7 +366,7 @@ impl GenericTransaction {
input: self.input.to_bytes(),
nonce: self.nonce.unwrap_or_default(),
value: self.value.unwrap_or_default(),
to: self.to,
to: self.to.unwrap_or_default(),
gas: self.gas.unwrap_or_default(),
gas_price: self.max_fee_per_gas.unwrap_or_default(),
max_fee_per_gas: self.max_fee_per_gas.unwrap_or_default(),
Expand Down Expand Up @@ -432,7 +432,7 @@ fn from_unsigned_works_for_7702() {
input: Bytes::from(vec![1u8]),
nonce: U256::from(1),
value: U256::from(1),
to: Some(H160::zero()),
to: H160::zero(),
gas: U256::from(1),
gas_price: U256::from(20),
max_fee_per_gas: U256::from(20),
Expand Down
Loading
Loading