Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f9f559a
chore : bump polkadot-sdk
1xstj Oct 2, 2025
db4f0dc
chore : fix build errors
1xstj Oct 3, 2025
791471b
chore : cleanup
1xstj Oct 3, 2025
b618695
chore : cleanup
1xstj Oct 4, 2025
006bece
chore : more cleanup
1xstj Oct 6, 2025
14d8e6c
chore : more cleanup
1xstj Oct 6, 2025
99f5424
chore: format
1xstj Oct 6, 2025
17a36cf
chore: switch to stable toolchain
1xstj Oct 6, 2025
52ad2dc
chore: fix runtime benchmarks
1xstj Oct 7, 2025
89759c8
chore: format
1xstj Oct 7, 2025
56b85a0
chore: cleanup
1xstj Oct 7, 2025
af554a5
chore: clippy
1xstj Oct 7, 2025
2c18216
chore: clippy
1xstj Oct 8, 2025
f58d9d5
chore: cleanup
1xstj Oct 9, 2025
223424c
chore: format
1xstj Oct 9, 2025
cbba48f
Update all tests/mocks (#1055)
drewstone Oct 13, 2025
f5fac7b
chore: more cleanup
1xstj Oct 16, 2025
1079b33
chore: format
1xstj Oct 16, 2025
2dd9dcb
chore: generate new subxt files
1xstj Oct 21, 2025
5b124e7
chore: fix
drewstone Nov 11, 2025
e95874a
chore: fmt
drewstone Nov 11, 2025
7f01078
chore: fmt
drewstone Nov 11, 2025
2a9713f
chore: enable blueprint dependencies with stable2503 branch
drewstone Nov 11, 2025
37b1b48
fix: disable txpool RPC due to H256 type mismatches with stable2503
drewstone Nov 11, 2025
3a67f82
chore: run rustfmt with nightly to fix CI formatting
drewstone Nov 11, 2025
b3fe503
fix: derive Default for LockMultiplier to satisfy clippy
drewstone Nov 11, 2025
1c1b57a
fix: derive Default for ClaimPermission to satisfy clippy
drewstone Nov 12, 2025
4375fbc
chore: format test files with nightly rustfmt
drewstone Nov 12, 2025
e9773b1
chore: change target build
danielbui12 Nov 12, 2025
e6fde24
chore: resolve clippy issues
danielbui12 Nov 12, 2025
dead8a8
chore: fix rust fmt check
danielbui12 Nov 12, 2025
57f25ec
chore: update rust fmt
danielbui12 Nov 12, 2025
64347bd
chore: resolve all clippy issues
danielbui12 Nov 12, 2025
d927129
chore: generate new tangle-subxt
danielbui12 Nov 12, 2025
eaa5f90
fix: derive Default for ProxyType in testnet runtime
drewstone Nov 12, 2025
3452a43
fix: remove duplicate Default derive in ProxyType
drewstone Nov 12, 2025
3f1e491
chore: restore e2e test files
drewstone Nov 12, 2025
b5ebf5f
feat: add Chopsticks migration testing infrastructure
drewstone Nov 12, 2025
35471f0
fix(chopsticks): Fix storage format and db paths in configs
drewstone Nov 12, 2025
bf01785
fix: resolve TxPool H256 type mismatch in stable2503 upgrade
drewstone Nov 12, 2025
5144c75
chore: bump alloy
danielbui12 Nov 13, 2025
4e83476
chore: fixing e2e test
danielbui12 Nov 13, 2025
ba2e7fb
chore: update try runtime CLI
danielbui12 Nov 17, 2025
98f52d9
chore: adding frame-try-runtime for try-runtime feature
danielbui12 Nov 17, 2025
3ab03cc
chore: update test migration script to use snapshot
danielbui12 Nov 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
18,313 changes: 5,822 additions & 12,491 deletions Cargo.lock

Large diffs are not rendered by default.

350 changes: 177 additions & 173 deletions Cargo.toml

Large diffs are not rendered by default.

29 changes: 17 additions & 12 deletions client/evm-tracing/src/formatters/call_tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ impl super::ResponseFormatter for Formatter {
gas_used,
trace_address: Some(trace_address.clone()),
inner: match inner.clone() {
BlockscoutCallInner::Call { input, to, res, call_type } =>
BlockscoutCallInner::Call { input, to, res, call_type } => {
CallTracerInner::Call {
call_type: match call_type {
CallType::Call => "CALL".as_bytes().to_vec(),
CallType::CallCode => "CALLCODE".as_bytes().to_vec(),
CallType::DelegateCall =>
"DELEGATECALL".as_bytes().to_vec(),
CallType::DelegateCall => {
"DELEGATECALL".as_bytes().to_vec()
},
CallType::StaticCall => "STATICCALL".as_bytes().to_vec(),
},
to,
Expand All @@ -74,7 +75,8 @@ impl super::ResponseFormatter for Formatter {
CallResult::Output { .. } => it.logs.clone(),
CallResult::Error { .. } => Vec::new(),
},
},
}
},
BlockscoutCallInner::Create { init, res } => CallTracerInner::Create {
input: init,
error: match res {
Expand All @@ -88,19 +90,21 @@ impl super::ResponseFormatter for Formatter {
CreateResult::Error { .. } => None,
},
output: match res {
CreateResult::Success { created_contract_code, .. } =>
Some(created_contract_code),
CreateResult::Success { created_contract_code, .. } => {
Some(created_contract_code)
},
CreateResult::Error { .. } => None,
},
value,
call_type: "CREATE".as_bytes().to_vec(),
},
BlockscoutCallInner::SelfDestruct { balance, to } =>
BlockscoutCallInner::SelfDestruct { balance, to } => {
CallTracerInner::SelfDestruct {
value: balance,
to,
call_type: "SELFDESTRUCT".as_bytes().to_vec(),
},
}
},
},
calls: Vec::new(),
})
Expand Down Expand Up @@ -190,10 +194,11 @@ impl super::ResponseFormatter for Formatter {
(
Call::CallTracer(CallTracerCall { trace_address: Some(a), .. }),
Call::CallTracer(CallTracerCall { trace_address: Some(b), .. }),
) =>
&b[..] ==
a.get(0..a.len() - 1)
.expect("non-root element while traversing trace result"),
) => {
&b[..]
== a.get(0..a.len() - 1)
.expect("non-root element while traversing trace result")
},
_ => unreachable!(),
}) {
// Remove `trace_address` from result.
Expand Down
15 changes: 9 additions & 6 deletions client/evm-tracing/src/formatters/trace_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ impl super::ResponseFormatter for Formatter {
// Can't be known here, must be inserted upstream.
block_number: 0,
output: match res {
CallResult::Output(output) =>
CallResult::Output(output) => {
TransactionTraceOutput::Result(TransactionTraceResult::Call {
gas_used: trace.gas_used,
output,
}),
})
},
CallResult::Error(error) => TransactionTraceOutput::Error(error),
},
subtraces: trace.subtraces,
Expand All @@ -87,14 +88,16 @@ impl super::ResponseFormatter for Formatter {
CreateResult::Success {
created_contract_address_hash,
created_contract_code,
} =>
} => {
TransactionTraceOutput::Result(TransactionTraceResult::Create {
gas_used: trace.gas_used,
code: created_contract_code,
address: created_contract_address_hash,
}),
CreateResult::Error { error } =>
TransactionTraceOutput::Error(error),
})
},
CreateResult::Error { error } => {
TransactionTraceOutput::Error(error)
},
},
subtraces: trace.subtraces,
trace_address: trace.trace_address.clone(),
Expand Down
71 changes: 42 additions & 29 deletions client/evm-tracing/src/listeners/call_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ impl Listener {

pub fn gasometer_event(&mut self, event: GasometerEvent) {
match event {
GasometerEvent::RecordCost { snapshot, .. } |
GasometerEvent::RecordDynamicCost { snapshot, .. } |
GasometerEvent::RecordStipend { snapshot, .. } => {
GasometerEvent::RecordCost { snapshot, .. }
| GasometerEvent::RecordDynamicCost { snapshot, .. }
| GasometerEvent::RecordStipend { snapshot, .. } => {
if let Some(context) = self.context_stack.last_mut() {
if context.start_gas.is_none() {
context.start_gas = Some(snapshot.gas());
Expand Down Expand Up @@ -497,12 +497,13 @@ impl Listener {
// behavior (like batch precompile does) thus we simply consider this a call.
self.call_type = Some(CallType::Call);
},
EvmEvent::Log { address, topics, data } =>
EvmEvent::Log { address, topics, data } => {
if self.with_log {
if let Some(stack) = self.context_stack.last_mut() {
stack.logs.push(Log { address, topics, data });
}
},
}
},

// We ignore other kinds of message if any (new ones may be added in the future).
#[allow(unreachable_patterns)]
Expand Down Expand Up @@ -536,13 +537,15 @@ impl Listener {
match context.context_type {
ContextType::Call(call_type) => {
let res = match &reason {
ExitReason::Succeed(ExitSucceed::Returned) =>
CallResult::Output(return_value.to_vec()),
ExitReason::Succeed(ExitSucceed::Returned) => {
CallResult::Output(return_value.to_vec())
},
ExitReason::Succeed(_) => CallResult::Output(vec![]),
ExitReason::Error(error) => CallResult::Error(error_message(error)),

ExitReason::Revert(_) =>
CallResult::Error(b"execution reverted".to_vec()),
ExitReason::Revert(_) => {
CallResult::Error(b"execution reverted".to_vec())
},
ExitReason::Fatal(_) => CallResult::Error(vec![]),
};

Expand All @@ -568,10 +571,12 @@ impl Listener {
created_contract_address_hash: context.to,
created_contract_code: return_value.to_vec(),
},
ExitReason::Error(error) =>
CreateResult::Error { error: error_message(error) },
ExitReason::Revert(_) =>
CreateResult::Error { error: b"execution reverted".to_vec() },
ExitReason::Error(error) => {
CreateResult::Error { error: error_message(error) }
},
ExitReason::Revert(_) => {
CreateResult::Error { error: b"execution reverted".to_vec() }
},
ExitReason::Fatal(_) => CreateResult::Error { error: vec![] },
};

Expand Down Expand Up @@ -620,14 +625,15 @@ impl ListenerT for Listener {
Event::Gasometer(gasometer_event) => self.gasometer_event(gasometer_event),
Event::Runtime(runtime_event) => self.runtime_event(runtime_event),
Event::Evm(evm_event) => self.evm_event(evm_event),
Event::CallListNew() =>
Event::CallListNew() => {
if !self.call_list_first_transaction {
self.finish_transaction();
self.skip_next_context = false;
self.entries.push(BTreeMap::new());
} else {
self.call_list_first_transaction = false;
},
}
},
};
}

Expand Down Expand Up @@ -726,8 +732,9 @@ mod tests {
target: H160::default(),
balance: U256::zero(),
},
TestEvmEvent::Exit =>
EvmEvent::Exit { reason: exit_reason.unwrap(), return_value: Vec::new() },
TestEvmEvent::Exit => {
EvmEvent::Exit { reason: exit_reason.unwrap(), return_value: Vec::new() }
},
TestEvmEvent::TransactCall => EvmEvent::TransactCall {
caller: H160::default(),
address: H160::default(),
Expand All @@ -750,8 +757,9 @@ mod tests {
gas_limit: 0u64,
address: H160::default(),
},
TestEvmEvent::Log =>
EvmEvent::Log { address: H160::default(), topics: Vec::new(), data: Vec::new() },
TestEvmEvent::Log => {
EvmEvent::Log { address: H160::default(), topics: Vec::new(), data: Vec::new() }
},
}
}

Expand All @@ -764,8 +772,9 @@ mod tests {
stack: test_stack(),
memory: test_memory(),
},
TestRuntimeEvent::StepResult =>
RuntimeEvent::StepResult { result: Ok(()), return_value: Vec::new() },
TestRuntimeEvent::StepResult => {
RuntimeEvent::StepResult { result: Ok(()), return_value: Vec::new() }
},
TestRuntimeEvent::SLoad => RuntimeEvent::SLoad {
address: H160::default(),
index: H256::default(),
Expand All @@ -781,20 +790,24 @@ mod tests {

fn test_emit_gasometer_event(event_type: TestGasometerEvent) -> GasometerEvent {
match event_type {
TestGasometerEvent::RecordCost =>
GasometerEvent::RecordCost { cost: 0u64, snapshot: test_snapshot() },
TestGasometerEvent::RecordRefund =>
GasometerEvent::RecordRefund { refund: 0i64, snapshot: test_snapshot() },
TestGasometerEvent::RecordStipend =>
GasometerEvent::RecordStipend { stipend: 0u64, snapshot: test_snapshot() },
TestGasometerEvent::RecordCost => {
GasometerEvent::RecordCost { cost: 0u64, snapshot: test_snapshot() }
},
TestGasometerEvent::RecordRefund => {
GasometerEvent::RecordRefund { refund: 0i64, snapshot: test_snapshot() }
},
TestGasometerEvent::RecordStipend => {
GasometerEvent::RecordStipend { stipend: 0u64, snapshot: test_snapshot() }
},
TestGasometerEvent::RecordDynamicCost => GasometerEvent::RecordDynamicCost {
gas_cost: 0u64,
memory_gas: 0u64,
gas_refund: 0i64,
snapshot: test_snapshot(),
},
TestGasometerEvent::RecordTransaction =>
GasometerEvent::RecordTransaction { cost: 0u64, snapshot: test_snapshot() },
TestGasometerEvent::RecordTransaction => {
GasometerEvent::RecordTransaction { cost: 0u64, snapshot: test_snapshot() }
},
}
}

Expand Down
4 changes: 2 additions & 2 deletions client/evm-tracing/src/listeners/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ impl Listener {
_ => (),
}
},
RuntimeEvent::SLoad { address: _, index, value } |
RuntimeEvent::SStore { address: _, index, value } => {
RuntimeEvent::SLoad { address: _, index, value }
| RuntimeEvent::SStore { address: _, index, value } => {
if let Some(context) = self.context_stack.last_mut() {
if !self.disable_storage {
context.storage_cache.insert(index, value);
Expand Down
2 changes: 1 addition & 1 deletion client/rpc-core/debug/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0-only"
repository = { workspace = true }

[dependencies]
ethereum = { workspace = true, features = [ "with-codec" ] }
ethereum = { workspace = true, features = [ "with-scale" ] }
ethereum-types = { workspace = true, features = [ "std" ] }
futures = { workspace = true, features = [ "compat" ] }
jsonrpsee = { workspace = true, features = [ "macros", "server" ] }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc-core/txpool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0-only"
repository = { workspace = true }

[dependencies]
ethereum = { workspace = true, features = ["std", "with-codec"] }
ethereum = { workspace = true, features = ["std", "with-scale"] }
ethereum-types = { workspace = true, features = ["std"] }
jsonrpsee = { workspace = true, features = ["macros", "server"] }
serde = { workspace = true, features = ["derive"] }
Expand Down
51 changes: 39 additions & 12 deletions client/rpc-core/txpool/src/types/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// along with Tangle. If not, see <http://www.gnu.org/licenses/>.

use crate::GetT;
use ethereum::{TransactionAction, TransactionV2 as EthereumTransaction};
use ethereum::{TransactionAction, TransactionV3 as EthereumTransaction};
use ethereum_types::{H160, H256, U256};
use fc_rpc_core::types::Bytes;
use serde::{Serialize, Serializer};
Expand Down Expand Up @@ -67,26 +67,53 @@ where
impl GetT for Transaction {
fn get(hash: H256, from_address: H160, txn: &EthereumTransaction) -> Self {
let (nonce, action, value, gas_price, gas_limit, input) = match txn {
EthereumTransaction::Legacy(t) =>
(t.nonce, t.action, t.value, t.gas_price, t.gas_limit, t.input.clone()),
EthereumTransaction::EIP2930(t) =>
(t.nonce, t.action, t.value, t.gas_price, t.gas_limit, t.input.clone()),
EthereumTransaction::EIP1559(t) =>
(t.nonce, t.action, t.value, t.max_fee_per_gas, t.gas_limit, t.input.clone()),
EthereumTransaction::Legacy(t) => {
(t.nonce, t.action, t.value, t.gas_price, t.gas_limit, t.input.clone())
},
EthereumTransaction::EIP2930(t) => {
(t.nonce, t.action, t.value, t.gas_price, t.gas_limit, t.input.clone())
},
EthereumTransaction::EIP1559(t) => {
(t.nonce, t.action, t.value, t.max_fee_per_gas, t.gas_limit, t.input.clone())
},
EthereumTransaction::EIP7702(t) => (
t.nonce,
ethereum::TransactionAction::Create,
Default::default(),
t.max_fee_per_gas,
t.gas_limit,
Default::default(),
),
};

let nonce_bytes = nonce.to_big_endian();
let nonce_converted = U256::from_big_endian(&nonce_bytes);

let value_bytes = value.to_big_endian();
let value_converted = U256::from_big_endian(&value_bytes);

let gas_price_bytes = gas_price.to_big_endian();
let gas_price_converted = U256::from_big_endian(&gas_price_bytes);

let gas_limit_bytes = gas_limit.to_big_endian();
let gas_limit_converted = U256::from_big_endian(&gas_limit_bytes);

Self {
hash,
nonce,
nonce: nonce_converted,
block_hash: None,
block_number: None,
from: from_address,
to: match action {
TransactionAction::Call(to) => Some(to),
TransactionAction::Call(to) => {
let to_bytes: [u8; 20] = to.0;
Some(H160::from_slice(&to_bytes))
},
_ => None,
},
value,
gas_price,
gas: gas_limit,
value: value_converted,
gas_price: gas_price_converted,
gas: gas_limit_converted,
input: Bytes(input),
transaction_index: None,
}
Expand Down
Loading
Loading