mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-22 23:07:58 +00:00
Wire up reporting to benchmarks (#195)
* Modify the structure of the `MinedBlockInformation` * Report the step path to the watcher * Make report format more benchmark friendly * make report more benchmarks friendly * Add more models to the report * Remove corpus from the report * Add step information to the benchmark report * Include the contract information in the report * Add the block information to the report * compute metrics in each report * Cleanup watcher from temp code
This commit is contained in:
@@ -37,7 +37,10 @@ use sp_core::crypto::Ss58Codec;
|
||||
use sp_runtime::AccountId32;
|
||||
|
||||
use revive_dt_config::*;
|
||||
use revive_dt_node_interaction::{EthereumNode, MinedBlockInformation};
|
||||
use revive_dt_node_interaction::EthereumNode;
|
||||
use revive_dt_report::{
|
||||
EthereumMinedBlockInformation, MinedBlockInformation, SubstrateMinedBlockInformation,
|
||||
};
|
||||
use subxt::{OnlineClient, SubstrateConfig};
|
||||
use tokio::sync::OnceCell;
|
||||
use tracing::{instrument, trace};
|
||||
@@ -557,20 +560,24 @@ impl EthereumNode for SubstrateNode {
|
||||
let max_proof_size = limits.max_block.proof_size;
|
||||
|
||||
Some(MinedBlockInformation {
|
||||
block_number: substrate_block.number() as _,
|
||||
block_timestamp: revive_block.header.timestamp,
|
||||
mined_gas: revive_block.header.gas_used as _,
|
||||
block_gas_limit: revive_block.header.gas_limit as _,
|
||||
transaction_hashes: revive_block
|
||||
.transactions
|
||||
.into_hashes()
|
||||
.as_hashes()
|
||||
.expect("Must be hashes")
|
||||
.to_vec(),
|
||||
ref_time: block_ref_time,
|
||||
max_ref_time,
|
||||
proof_size: block_proof_size,
|
||||
max_proof_size,
|
||||
ethereum_block_information: EthereumMinedBlockInformation {
|
||||
block_number: revive_block.number(),
|
||||
block_timestamp: revive_block.header.timestamp,
|
||||
mined_gas: revive_block.header.gas_used as _,
|
||||
block_gas_limit: revive_block.header.gas_limit as _,
|
||||
transaction_hashes: revive_block
|
||||
.transactions
|
||||
.into_hashes()
|
||||
.as_hashes()
|
||||
.expect("Must be hashes")
|
||||
.to_vec(),
|
||||
},
|
||||
substrate_block_information: Some(SubstrateMinedBlockInformation {
|
||||
ref_time: block_ref_time,
|
||||
max_ref_time,
|
||||
proof_size: block_proof_size,
|
||||
max_proof_size,
|
||||
}),
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user