mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-12 20:31:10 +00:00
Final set of renames
This commit is contained in:
@@ -52,122 +52,152 @@ All of the above need to be installed and available in the path in order for the
|
||||
This tool is being updated quite frequently. Therefore, it's recommended that you don't install the tool and then run it, but rather that you run it from the root of the directory using `cargo run --release`. The help command of the tool gives you all of the information you need to know about each of the options and flags that the tool offers.
|
||||
|
||||
```bash
|
||||
$ cargo run --release -- --help
|
||||
Usage: retester [OPTIONS]
|
||||
$ cargo run --release -- execute-tests --help
|
||||
Error: Executes tests in the MatterLabs format differentially on multiple targets concurrently
|
||||
|
||||
Usage: retester execute-tests [OPTIONS]
|
||||
|
||||
Options:
|
||||
-s, --solc <SOLC>
|
||||
The `solc` version to use if the test didn't specify it explicitly
|
||||
-w, --working-directory <WORKING_DIRECTORY>
|
||||
The working directory that the program will use for all of the temporary artifacts needed at runtime.
|
||||
|
||||
[default: 0.8.29]
|
||||
If not specified, then a temporary directory will be created and used by the program for all temporary artifacts.
|
||||
|
||||
--wasm
|
||||
Use the Wasm compiler versions
|
||||
[default: ]
|
||||
|
||||
-r, --resolc <RESOLC>
|
||||
The path to the `resolc` executable to be tested.
|
||||
-p, --platform <PLATFORMS>
|
||||
The set of platforms that the differential tests should run on
|
||||
|
||||
By default it uses the `resolc` binary found in `$PATH`.
|
||||
[default: geth-evm-solc,revive-dev-node-polkavm-resolc]
|
||||
|
||||
If `--wasm` is set, this should point to the resolc Wasm ile.
|
||||
|
||||
[default: resolc]
|
||||
Possible values:
|
||||
- geth-evm-solc: The Go-ethereum reference full node EVM implementation with the solc compiler
|
||||
- kitchensink-polkavm-resolc: The kitchensink node with the PolkaVM backend with the resolc compiler
|
||||
- kitchensink-revm-solc: The kitchensink node with the REVM backend with the solc compiler
|
||||
- revive-dev-node-polkavm-resolc: The revive dev node with the PolkaVM backend with the resolc compiler
|
||||
- revive-dev-node-revm-solc: The revive dev node with the REVM backend with the solc compiler
|
||||
|
||||
-c, --corpus <CORPUS>
|
||||
A list of test corpus JSON files to be tested
|
||||
|
||||
-w, --workdir <WORKING_DIRECTORY>
|
||||
A place to store temporary artifacts during test execution.
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
|
||||
Creates a temporary dir if not specified.
|
||||
Solc Configuration:
|
||||
--solc.version <VERSION>
|
||||
Specifies the default version of the Solc compiler that should be used if there is no override specified by one of the test cases
|
||||
|
||||
-g, --geth <GETH>
|
||||
The path to the `geth` executable.
|
||||
[default: 0.8.29]
|
||||
|
||||
By default it uses `geth` binary found in `$PATH`.
|
||||
Resolc Configuration:
|
||||
--resolc.path <resolc.path>
|
||||
Specifies the path of the resolc compiler to be used by the tool.
|
||||
|
||||
If this is not specified, then the tool assumes that it should use the resolc binary that's provided in the user's $PATH.
|
||||
|
||||
[default: resolc]
|
||||
|
||||
Geth Configuration:
|
||||
--geth.path <geth.path>
|
||||
Specifies the path of the geth node to be used by the tool.
|
||||
|
||||
If this is not specified, then the tool assumes that it should use the geth binary that's provided in the user's $PATH.
|
||||
|
||||
[default: geth]
|
||||
|
||||
--geth-start-timeout <GETH_START_TIMEOUT>
|
||||
The maximum time in milliseconds to wait for geth to start
|
||||
--geth.start-timeout-ms <geth.start-timeout-ms>
|
||||
The amount of time to wait upon startup before considering that the node timed out
|
||||
|
||||
[default: 5000]
|
||||
|
||||
--genesis <GENESIS_FILE>
|
||||
Configure nodes according to this genesis.json file
|
||||
Kitchensink Configuration:
|
||||
--kitchensink.path <kitchensink.path>
|
||||
Specifies the path of the kitchensink node to be used by the tool.
|
||||
|
||||
[default: genesis.json]
|
||||
If this is not specified, then the tool assumes that it should use the kitchensink binary that's provided in the user's $PATH.
|
||||
|
||||
-a, --account <ACCOUNT>
|
||||
The signing account private key
|
||||
[default: substrate-node]
|
||||
|
||||
--kitchensink.start-timeout-ms <kitchensink.start-timeout-ms>
|
||||
The amount of time to wait upon startup before considering that the node timed out
|
||||
|
||||
[default: 5000]
|
||||
|
||||
--kitchensink.dont-use-dev-node
|
||||
This configures the tool to use Kitchensink instead of using the revive-dev-node
|
||||
|
||||
Revive Dev Node Configuration:
|
||||
--revive-dev-node.path <revive-dev-node.path>
|
||||
Specifies the path of the revive dev node to be used by the tool.
|
||||
|
||||
If this is not specified, then the tool assumes that it should use the revive dev node binary that's provided in the user's $PATH.
|
||||
|
||||
[default: revive-dev-node]
|
||||
|
||||
--revive-dev-node.start-timeout-ms <revive-dev-node.start-timeout-ms>
|
||||
The amount of time to wait upon startup before considering that the node timed out
|
||||
|
||||
[default: 5000]
|
||||
|
||||
Eth RPC Configuration:
|
||||
--eth-rpc.path <eth-rpc.path>
|
||||
Specifies the path of the ETH RPC to be used by the tool.
|
||||
|
||||
If this is not specified, then the tool assumes that it should use the ETH RPC binary that's provided in the user's $PATH.
|
||||
|
||||
[default: eth-rpc]
|
||||
|
||||
--eth-rpc.start-timeout-ms <eth-rpc.start-timeout-ms>
|
||||
The amount of time to wait upon startup before considering that the node timed out
|
||||
|
||||
[default: 5000]
|
||||
|
||||
Genesis Configuration:
|
||||
--genesis.path <genesis.path>
|
||||
Specifies the path of the genesis file to use for the nodes that are started.
|
||||
|
||||
This is expected to be the path of a JSON geth genesis file.
|
||||
|
||||
Wallet Configuration:
|
||||
--wallet.default-private-key <DEFAULT_KEY>
|
||||
The private key of the default signer
|
||||
|
||||
[default: 0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d]
|
||||
|
||||
--private-keys-count <PRIVATE_KEYS_TO_ADD>
|
||||
--wallet.additional-keys <ADDITIONAL_KEYS>
|
||||
This argument controls which private keys the nodes should have access to and be added to its wallet signers. With a value of N, private keys (0, N] will be added to the signer set of the node
|
||||
|
||||
[default: 100000]
|
||||
|
||||
-l, --leader <LEADER>
|
||||
The differential testing leader node implementation
|
||||
|
||||
[default: geth]
|
||||
|
||||
Possible values:
|
||||
- geth: The go-ethereum reference full node EVM implementation
|
||||
- kitchensink: The kitchensink runtime provides the PolkaVM (PVM) based node implentation
|
||||
|
||||
-f, --follower <FOLLOWER>
|
||||
The differential testing follower node implementation
|
||||
|
||||
[default: kitchensink]
|
||||
|
||||
Possible values:
|
||||
- geth: The go-ethereum reference full node EVM implementation
|
||||
- kitchensink: The kitchensink runtime provides the PolkaVM (PVM) based node implentation
|
||||
|
||||
--compile-only <COMPILE_ONLY>
|
||||
Only compile against this testing platform (doesn't execute the tests)
|
||||
|
||||
Possible values:
|
||||
- geth: The go-ethereum reference full node EVM implementation
|
||||
- kitchensink: The kitchensink runtime provides the PolkaVM (PVM) based node implentation
|
||||
|
||||
--number-of-nodes <NUMBER_OF_NODES>
|
||||
Concurrency Configuration:
|
||||
--concurrency.number-of-nodes <NUMBER_OF_NODES>
|
||||
Determines the amount of nodes that will be spawned for each chain
|
||||
|
||||
[default: 1]
|
||||
[default: 5]
|
||||
|
||||
--number-of-threads <NUMBER_OF_THREADS>
|
||||
--concurrency.number-of-threads <NUMBER_OF_THREADS>
|
||||
Determines the amount of tokio worker threads that will will be used
|
||||
|
||||
[default: 16]
|
||||
|
||||
--number-concurrent-tasks <NUMBER_CONCURRENT_TASKS>
|
||||
Determines the amount of concurrent tasks that will be spawned to run tests. Defaults to 10 x the number of nodes
|
||||
--concurrency.number-of-concurrent-tasks <NUMBER_CONCURRENT_TASKS>
|
||||
Determines the amount of concurrent tasks that will be spawned to run tests.
|
||||
|
||||
-e, --extract-problems
|
||||
Extract problems back to the test corpus
|
||||
Defaults to 10 x the number of nodes.
|
||||
|
||||
-k, --kitchensink <KITCHENSINK>
|
||||
The path to the `kitchensink` executable.
|
||||
--concurrency.ignore-concurrency-limit
|
||||
Determines if the concurrency limit should be ignored or not
|
||||
|
||||
By default it uses `substrate-node` binary found in `$PATH`.
|
||||
|
||||
[default: substrate-node]
|
||||
|
||||
-p, --eth_proxy <ETH_PROXY>
|
||||
The path to the `eth_proxy` executable.
|
||||
|
||||
By default it uses `eth-rpc` binary found in `$PATH`.
|
||||
|
||||
[default: eth-rpc]
|
||||
|
||||
-i, --invalidate-compilation-cache
|
||||
Compilation Configuration:
|
||||
--compilation.invalidate-cache
|
||||
Controls if the compilation cache should be invalidated or not
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
Report Configuration:
|
||||
--report.include-compiler-input
|
||||
Controls if the compiler input is included in the final report
|
||||
|
||||
--report.include-compiler-output
|
||||
Controls if the compiler output is included in the final report
|
||||
```
|
||||
|
||||
To run tests with this tool you need a corpus JSON file that defines the tests included in the corpus. The simplest corpus file looks like the following:
|
||||
@@ -188,10 +218,11 @@ The simplest command to run this tool is the following:
|
||||
|
||||
```bash
|
||||
RUST_LOG="info" cargo run --release -- execute-tests \
|
||||
--follower geth \
|
||||
--corpus path_to_your_corpus_file.json \
|
||||
--working-directory path_to_a_temporary_directory_to_cache_things_in \
|
||||
--platform geth-evm-solc \
|
||||
--corpus corp.json \
|
||||
--working-directory workdir \
|
||||
--concurrency.number-of-nodes 5 \
|
||||
--concurrency.ignore-concurrency-limit \
|
||||
> logs.log \
|
||||
2> output.log
|
||||
```
|
||||
|
||||
@@ -24,7 +24,7 @@ use strum::{AsRefStr, Display, EnumString, IntoStaticStr};
|
||||
IntoStaticStr,
|
||||
JsonSchema,
|
||||
)]
|
||||
#[serde(rename = "kebab-case")]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
#[strum(serialize_all = "kebab-case")]
|
||||
pub enum PlatformIdentifier {
|
||||
/// The Go-ethereum reference full node EVM implementation with the solc compiler.
|
||||
@@ -112,7 +112,7 @@ pub enum NodeIdentifier {
|
||||
IntoStaticStr,
|
||||
JsonSchema,
|
||||
)]
|
||||
#[serde(rename = "lowercase")]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
#[strum(serialize_all = "lowercase")]
|
||||
pub enum VmIdentifier {
|
||||
/// The ethereum virtual machine.
|
||||
|
||||
@@ -145,7 +145,7 @@ async fn run_driver(
|
||||
let pool = NodePool::new(Context::ExecuteTests(Box::new(context.clone())), platform)
|
||||
.inspect_err(|err| {
|
||||
error!(
|
||||
%err,
|
||||
?err,
|
||||
platform_identifier = %platform.platform_identifier(),
|
||||
"Failed to initialize the node pool for the platform."
|
||||
)
|
||||
@@ -458,7 +458,7 @@ async fn handle_case_driver<'a>(
|
||||
.await
|
||||
.inspect_err(|err| {
|
||||
error!(
|
||||
%err,
|
||||
?err,
|
||||
platform_identifier = %platform.platform_identifier(),
|
||||
"Pre-linking compilation failed"
|
||||
)
|
||||
@@ -476,7 +476,7 @@ async fn handle_case_driver<'a>(
|
||||
.contract_sources()
|
||||
.inspect_err(|err| {
|
||||
error!(
|
||||
%err,
|
||||
?err,
|
||||
platform_identifier = %platform.platform_identifier(),
|
||||
"Failed to retrieve contract sources from metadata"
|
||||
)
|
||||
@@ -526,7 +526,7 @@ async fn handle_case_driver<'a>(
|
||||
.await
|
||||
.inspect_err(|err| {
|
||||
error!(
|
||||
%err,
|
||||
?err,
|
||||
%library_instance,
|
||||
platform_identifier = %platform.platform_identifier(),
|
||||
"Failed to deploy the library"
|
||||
@@ -578,7 +578,7 @@ async fn handle_case_driver<'a>(
|
||||
.await
|
||||
.inspect_err(|err| {
|
||||
error!(
|
||||
%err,
|
||||
?err,
|
||||
platform_identifier = %platform.platform_identifier(),
|
||||
"Pre-linking compilation failed"
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ pub trait ResolverApi {
|
||||
tx_hash: TxHash,
|
||||
) -> Pin<Box<dyn Future<Output = Result<u128>> + '_>>;
|
||||
|
||||
// TODO: This is currently a u128 due to Kitchensink needing more than 64 bits for its gas limit
|
||||
// TODO: This is currently a u128 due to substrate needing more than 64 bits for its gas limit
|
||||
// when we implement the changes to the gas we need to adjust this to be a u64.
|
||||
/// Returns the gas limit of the specified block.
|
||||
fn block_gas_limit(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/// This constant defines how much Wei accounts are pre-seeded with in genesis.
|
||||
///
|
||||
/// Note: After changing this number, check that the tests for kitchensink work as we encountered
|
||||
/// some issues with different values of the initial balance on Kitchensink.
|
||||
/// Note: After changing this number, check that the tests for substrate work as we encountered
|
||||
/// some issues with different values of the initial balance on substrate.
|
||||
pub const INITIAL_BALANCE: u128 = 10u128.pow(37);
|
||||
|
||||
@@ -51,7 +51,7 @@ use crate::{Node, common::FallbackGasFiller, constants::INITIAL_BALANCE};
|
||||
|
||||
static NODE_COUNT: AtomicU32 = AtomicU32::new(0);
|
||||
|
||||
/// A node implementation for Substrate based chains. Currently, this supports either kitchensink
|
||||
/// A node implementation for Substrate based chains. Currently, this supports either substrate
|
||||
/// or the revive-dev-node which is done by changing the path and some of the other arguments passed
|
||||
/// to the command.
|
||||
#[derive(Debug)]
|
||||
@@ -135,9 +135,9 @@ impl SubstrateNode {
|
||||
let _ = clear_directory(&self.logs_directory);
|
||||
|
||||
create_dir_all(&self.base_directory)
|
||||
.context("Failed to create base directory for kitchensink node")?;
|
||||
.context("Failed to create base directory for substrate node")?;
|
||||
create_dir_all(&self.logs_directory)
|
||||
.context("Failed to create logs directory for kitchensink node")?;
|
||||
.context("Failed to create logs directory for substrate node")?;
|
||||
|
||||
let template_chainspec_path = self.base_directory.join(Self::CHAIN_SPEC_JSON_FILE);
|
||||
|
||||
@@ -202,10 +202,10 @@ impl SubstrateNode {
|
||||
|
||||
serde_json::to_writer_pretty(
|
||||
std::fs::File::create(&template_chainspec_path)
|
||||
.context("Failed to create kitchensink template chainspec file")?,
|
||||
.context("Failed to create substrate template chainspec file")?,
|
||||
&chainspec_json,
|
||||
)
|
||||
.context("Failed to write kitchensink template chainspec JSON")?;
|
||||
.context("Failed to write substrate template chainspec JSON")?;
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
@@ -229,14 +229,14 @@ impl SubstrateNode {
|
||||
};
|
||||
|
||||
// Start Substrate node
|
||||
let kitchensink_stdout_logs_file = open_options
|
||||
let substrate_stdout_logs_file = open_options
|
||||
.clone()
|
||||
.open(self.substrate_stdout_log_file_path())
|
||||
.context("Failed to open kitchensink stdout logs file")?;
|
||||
let kitchensink_stderr_logs_file = open_options
|
||||
.context("Failed to open substrate stdout logs file")?;
|
||||
let substrate_stderr_logs_file = open_options
|
||||
.clone()
|
||||
.open(self.substrate_stderr_log_file_path())
|
||||
.context("Failed to open kitchensink stderr logs file")?;
|
||||
.context("Failed to open substrate stderr logs file")?;
|
||||
let node_binary_path = self.node_binary.as_path();
|
||||
self.process_substrate = Command::new(node_binary_path)
|
||||
.arg("--dev")
|
||||
@@ -247,7 +247,7 @@ impl SubstrateNode {
|
||||
.arg("--rpc-port")
|
||||
.arg(substrate_rpc_port.to_string())
|
||||
.arg("--name")
|
||||
.arg(format!("revive-kitchensink-{}", self.id))
|
||||
.arg(format!("revive-substrate-{}", self.id))
|
||||
.arg("--force-authoring")
|
||||
.arg("--rpc-methods")
|
||||
.arg("Unsafe")
|
||||
@@ -257,14 +257,14 @@ impl SubstrateNode {
|
||||
.arg(u32::MAX.to_string())
|
||||
.env("RUST_LOG", Self::SUBSTRATE_LOG_ENV)
|
||||
.stdout(
|
||||
kitchensink_stdout_logs_file
|
||||
substrate_stdout_logs_file
|
||||
.try_clone()
|
||||
.context("Failed to clone kitchensink stdout log file handle")?,
|
||||
.context("Failed to clone substrate stdout log file handle")?,
|
||||
)
|
||||
.stderr(
|
||||
kitchensink_stderr_logs_file
|
||||
substrate_stderr_logs_file
|
||||
.try_clone()
|
||||
.context("Failed to clone kitchensink stderr log file handle")?,
|
||||
.context("Failed to clone substrate stderr log file handle")?,
|
||||
)
|
||||
.spawn()
|
||||
.context("Failed to spawn Substrate node process")?
|
||||
@@ -322,8 +322,8 @@ impl SubstrateNode {
|
||||
};
|
||||
|
||||
self.logs_file_to_flush.extend([
|
||||
kitchensink_stdout_logs_file,
|
||||
kitchensink_stderr_logs_file,
|
||||
substrate_stdout_logs_file,
|
||||
substrate_stderr_logs_file,
|
||||
eth_proxy_stdout_logs_file,
|
||||
eth_proxy_stderr_logs_file,
|
||||
]);
|
||||
@@ -451,10 +451,10 @@ impl EthereumNode for SubstrateNode {
|
||||
.context("Failed to create provider for transaction submission")?
|
||||
.send_transaction(transaction)
|
||||
.await
|
||||
.context("Failed to submit transaction to kitchensink proxy")?
|
||||
.context("Failed to submit transaction to substrate proxy")?
|
||||
.get_receipt()
|
||||
.await
|
||||
.context("Failed to fetch transaction receipt from kitchensink proxy")?;
|
||||
.context("Failed to fetch transaction receipt from substrate proxy")?;
|
||||
Ok(receipt)
|
||||
})
|
||||
}
|
||||
@@ -471,7 +471,7 @@ impl EthereumNode for SubstrateNode {
|
||||
.context("Failed to create provider for debug tracing")?
|
||||
.debug_trace_transaction(tx_hash, trace_options)
|
||||
.await
|
||||
.context("Failed to obtain debug trace from kitchensink proxy")
|
||||
.context("Failed to obtain debug trace from substrate proxy")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -503,7 +503,7 @@ impl EthereumNode for SubstrateNode {
|
||||
Box::pin(async move {
|
||||
self.provider()
|
||||
.await
|
||||
.context("Failed to get the Kitchensink provider")?
|
||||
.context("Failed to get the substrate provider")?
|
||||
.get_balance(address)
|
||||
.await
|
||||
.map_err(Into::into)
|
||||
@@ -518,7 +518,7 @@ impl EthereumNode for SubstrateNode {
|
||||
Box::pin(async move {
|
||||
self.provider()
|
||||
.await
|
||||
.context("Failed to get the Kitchensink provider")?
|
||||
.context("Failed to get the substrate provider")?
|
||||
.get_proof(address, keys)
|
||||
.latest()
|
||||
.await
|
||||
@@ -549,14 +549,14 @@ pub struct SubstrateNodeResolver<F: TxFiller<ReviveNetwork>, P: Provider<ReviveN
|
||||
impl<F: TxFiller<ReviveNetwork>, P: Provider<ReviveNetwork>> ResolverApi
|
||||
for SubstrateNodeResolver<F, P>
|
||||
{
|
||||
#[instrument(level = "info", skip_all, fields(kitchensink_node_id = self.id))]
|
||||
#[instrument(level = "info", skip_all, fields(substrate_node_id = self.id))]
|
||||
fn chain_id(
|
||||
&self,
|
||||
) -> Pin<Box<dyn Future<Output = anyhow::Result<alloy::primitives::ChainId>> + '_>> {
|
||||
Box::pin(async move { self.provider.get_chain_id().await.map_err(Into::into) })
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip_all, fields(kitchensink_node_id = self.id))]
|
||||
#[instrument(level = "info", skip_all, fields(substrate_node_id = self.id))]
|
||||
fn transaction_gas_price(
|
||||
&self,
|
||||
tx_hash: TxHash,
|
||||
@@ -570,7 +570,7 @@ impl<F: TxFiller<ReviveNetwork>, P: Provider<ReviveNetwork>> ResolverApi
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip_all, fields(kitchensink_node_id = self.id))]
|
||||
#[instrument(level = "info", skip_all, fields(substrate_node_id = self.id))]
|
||||
fn block_gas_limit(
|
||||
&self,
|
||||
number: BlockNumberOrTag,
|
||||
@@ -579,13 +579,13 @@ impl<F: TxFiller<ReviveNetwork>, P: Provider<ReviveNetwork>> ResolverApi
|
||||
self.provider
|
||||
.get_block_by_number(number)
|
||||
.await
|
||||
.context("Failed to get the kitchensink block")?
|
||||
.context("Failed to get the Kitchensink block, perhaps the chain has no blocks?")
|
||||
.context("Failed to get the substrate block")?
|
||||
.context("Failed to get the substrate block, perhaps the chain has no blocks?")
|
||||
.map(|block| block.header.gas_limit as _)
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip_all, fields(kitchensink_node_id = self.id))]
|
||||
#[instrument(level = "info", skip_all, fields(substrate_node_id = self.id))]
|
||||
fn block_coinbase(
|
||||
&self,
|
||||
number: BlockNumberOrTag,
|
||||
@@ -594,13 +594,13 @@ impl<F: TxFiller<ReviveNetwork>, P: Provider<ReviveNetwork>> ResolverApi
|
||||
self.provider
|
||||
.get_block_by_number(number)
|
||||
.await
|
||||
.context("Failed to get the kitchensink block")?
|
||||
.context("Failed to get the Kitchensink block, perhaps the chain has no blocks?")
|
||||
.context("Failed to get the substrate block")?
|
||||
.context("Failed to get the substrate block, perhaps the chain has no blocks?")
|
||||
.map(|block| block.header.beneficiary)
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip_all, fields(kitchensink_node_id = self.id))]
|
||||
#[instrument(level = "info", skip_all, fields(substrate_node_id = self.id))]
|
||||
fn block_difficulty(
|
||||
&self,
|
||||
number: BlockNumberOrTag,
|
||||
@@ -609,13 +609,13 @@ impl<F: TxFiller<ReviveNetwork>, P: Provider<ReviveNetwork>> ResolverApi
|
||||
self.provider
|
||||
.get_block_by_number(number)
|
||||
.await
|
||||
.context("Failed to get the kitchensink block")?
|
||||
.context("Failed to get the Kitchensink block, perhaps the chain has no blocks?")
|
||||
.context("Failed to get the substrate block")?
|
||||
.context("Failed to get the substrate block, perhaps the chain has no blocks?")
|
||||
.map(|block| U256::from_be_bytes(block.header.mix_hash.0))
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip_all, fields(kitchensink_node_id = self.id))]
|
||||
#[instrument(level = "info", skip_all, fields(substrate_node_id = self.id))]
|
||||
fn block_base_fee(
|
||||
&self,
|
||||
number: BlockNumberOrTag,
|
||||
@@ -624,8 +624,8 @@ impl<F: TxFiller<ReviveNetwork>, P: Provider<ReviveNetwork>> ResolverApi
|
||||
self.provider
|
||||
.get_block_by_number(number)
|
||||
.await
|
||||
.context("Failed to get the kitchensink block")?
|
||||
.context("Failed to get the Kitchensink block, perhaps the chain has no blocks?")
|
||||
.context("Failed to get the substrate block")?
|
||||
.context("Failed to get the substrate block, perhaps the chain has no blocks?")
|
||||
.and_then(|block| {
|
||||
block
|
||||
.header
|
||||
@@ -635,7 +635,7 @@ impl<F: TxFiller<ReviveNetwork>, P: Provider<ReviveNetwork>> ResolverApi
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip_all, fields(kitchensink_node_id = self.id))]
|
||||
#[instrument(level = "info", skip_all, fields(substrate_node_id = self.id))]
|
||||
fn block_hash(
|
||||
&self,
|
||||
number: BlockNumberOrTag,
|
||||
@@ -644,13 +644,13 @@ impl<F: TxFiller<ReviveNetwork>, P: Provider<ReviveNetwork>> ResolverApi
|
||||
self.provider
|
||||
.get_block_by_number(number)
|
||||
.await
|
||||
.context("Failed to get the kitchensink block")?
|
||||
.context("Failed to get the Kitchensink block, perhaps the chain has no blocks?")
|
||||
.context("Failed to get the substrate block")?
|
||||
.context("Failed to get the substrate block, perhaps the chain has no blocks?")
|
||||
.map(|block| block.header.hash)
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip_all, fields(kitchensink_node_id = self.id))]
|
||||
#[instrument(level = "info", skip_all, fields(substrate_node_id = self.id))]
|
||||
fn block_timestamp(
|
||||
&self,
|
||||
number: BlockNumberOrTag,
|
||||
@@ -659,13 +659,13 @@ impl<F: TxFiller<ReviveNetwork>, P: Provider<ReviveNetwork>> ResolverApi
|
||||
self.provider
|
||||
.get_block_by_number(number)
|
||||
.await
|
||||
.context("Failed to get the kitchensink block")?
|
||||
.context("Failed to get the Kitchensink block, perhaps the chain has no blocks?")
|
||||
.context("Failed to get the substrate block")?
|
||||
.context("Failed to get the substrate block, perhaps the chain has no blocks?")
|
||||
.map(|block| block.header.timestamp)
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip_all, fields(kitchensink_node_id = self.id))]
|
||||
#[instrument(level = "info", skip_all, fields(substrate_node_id = self.id))]
|
||||
fn last_block_number(&self) -> Pin<Box<dyn Future<Output = anyhow::Result<BlockNumber>> + '_>> {
|
||||
Box::pin(async move { self.provider.get_block_number().await.map_err(Into::into) })
|
||||
}
|
||||
@@ -709,9 +709,9 @@ impl Node for SubstrateNode {
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::null())
|
||||
.spawn()
|
||||
.context("Failed to spawn kitchensink --version")?
|
||||
.context("Failed to spawn substrate --version")?
|
||||
.wait_with_output()
|
||||
.context("Failed to wait for kitchensink --version")?
|
||||
.context("Failed to wait for substrate --version")?
|
||||
.stdout;
|
||||
Ok(String::from_utf8_lossy(&output).into())
|
||||
}
|
||||
|
||||
+4
-1
@@ -89,10 +89,13 @@ echo "This may take a while..."
|
||||
echo ""
|
||||
|
||||
# Run the tool
|
||||
RUST_LOG="error" cargo run --release -- execute-tests \
|
||||
RUST_LOG="info" cargo run --release -- execute-tests \
|
||||
--platform geth-evm-solc \
|
||||
--platform revive-dev-node-revm-solc \
|
||||
--corpus "$CORPUS_FILE" \
|
||||
--working-directory "$WORKDIR" \
|
||||
--concurrency.number-of-nodes 5 \
|
||||
--concurrency.ignore-concurrency-limit \
|
||||
--kitchensink.path "$SUBSTRATE_NODE_BIN" \
|
||||
--revive-dev-node.path "$REVIVE_DEV_NODE_BIN" \
|
||||
--eth-rpc.path "$ETH_RPC_BIN" \
|
||||
|
||||
Reference in New Issue
Block a user