Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 12 additions & 28 deletions .github/workflows/tests-evm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,46 +43,30 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: paritytech/evm-test-suite
ref: 79144d85626f97e481b84a16d2b8f0813d03548b
ref: d20230d0a70ad1159ee75b4c56a47e85173f19e5
path: evm-test-suite

- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
- uses: denoland/setup-deno@v1
with:
node-version: 22
deno-version: v2.x

- name: script
env:
# EVM tests don't work with batchSize 300 on self-hosted runners in docker container
BATCH_SIZE: 100
run: |
echo "Change to the evm-test-suite directory"
cd evm-test-suite
echo "Download the resolc binary"
wget -O resolc https://github.com/paritytech/revive/releases/download/v0.3.0/resolc-x86_64-unknown-linux-musl -q
chmod +x resolc
mv resolc /usr/local/bin
resolc --version

deno --version

echo "Check that binaries are in place"
export NODE_BIN_PATH=$(readlink -f ../target/release/revive-dev-node)
export REVIVE_DEV_NODE_PATH=$(readlink -f ../target/release/revive-dev-node)
export ETH_RPC_PATH=$(readlink -f ../target/release/eth-rpc)
export RESOLC_PATH=/usr/local/bin/resolc
echo $NODE_BIN_PATH $ETH_RPC_PATH $RESOLC_PATH
echo $REVIVE_DEV_NODE_PATH $ETH_RPC_PATH

echo "Install npm dependencies"
npm install
# cat matter-labs-tests/hardhat.config.ts | grep batchSize
echo "== Running pvm tests ==j"
START_REVIVE_DEV_NODE=true START_ETH_RPC=true deno task test:pvm

echo "Installing solc"
wget https://github.com/ethereum/solidity/releases/download/v0.8.30/solc-static-linux -q
chmod +x solc-static-linux
mv solc-static-linux /usr/local/bin/solc
# TODO restore once tests can be run against the revive-dev-node
# echo "Run the tests"
# echo "bash init.sh --kitchensink -- --matter-labs -- $NODE_BIN_PATH $ETH_RPC_PATH $RESOLC_PATH"
# bash init.sh --kitchensink -- --matter-labs -- $NODE_BIN_PATH $ETH_RPC_PATH $RESOLC_PATH
echo "Run eth-rpc tests"
bash init.sh --kitchensink http://localhost:9944 --eth-rpc -- $NODE_BIN_PATH $ETH_RPC_PATH $RESOLC_PATH
echo "== Running evm tests =="
START_REVIVE_DEV_NODE=true START_ETH_RPC=true deno task test:evm

- name: Collect tests results
if: always()
Expand All @@ -107,4 +91,4 @@ jobs:
exit 1
else
echo '### Good job! All the required jobs passed 🚀' >> $GITHUB_STEP_SUMMARY
fi
fi
9 changes: 9 additions & 0 deletions prdoc/pr_10041.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: "added baltathar, charleth, dorothy, and ethan to eth-rpc and revive-d\u2026"
doc:
- audience: Runtime Dev
description: adds more funded accounts to eth-rpc and dev-node
crates:
- name: revive-dev-runtime
bump: patch
- name: pallet-revive-eth-rpc
bump: patch
14 changes: 13 additions & 1 deletion substrate/frame/revive/dev-node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub mod genesis_config_presets {
use alloc::{vec, vec::Vec};
use serde_json::Value;

pub const ENDOWMENT: Balance = 1_001 * DOLLARS;
pub const ENDOWMENT: Balance = 1_000_000_001 * DOLLARS;

fn well_known_accounts() -> Vec<AccountId> {
Sr25519Keyring::well_known()
Expand All @@ -84,6 +84,18 @@ pub mod genesis_config_presets {
array_bytes::hex_n_into_unchecked(
"3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0eeeeeeeeeeeeeeeeeeeeeeee",
),
// subxt_signer::eth::dev::charleth()
array_bytes::hex_n_into_unchecked(
"798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfceeeeeeeeeeeeeeeeeeeeeeee",
),
// subxt_signer::eth::dev::dorothy()
array_bytes::hex_n_into_unchecked(
"773539d4ac0e786233d90a233654ccee26a613d9eeeeeeeeeeeeeeeeeeeeeeee",
),
// subxt_signer::eth::dev::ethan()
array_bytes::hex_n_into_unchecked(
"ff64d3f6efe2317ee2807d223a0bdc4c0c49dfdbeeeeeeeeeeeeeeeeeeeeeeee",
),
])
.collect::<Vec<_>>()
}
Expand Down
12 changes: 11 additions & 1 deletion substrate/frame/revive/rpc/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,17 @@ pub fn run(cmd: CliCommand) -> anyhow::Result<()> {
/// Create the JSON-RPC module.
fn rpc_module(is_dev: bool, client: Client) -> Result<RpcModule<()>, sc_service::Error> {
let eth_api = EthRpcServerImpl::new(client.clone())
.with_accounts(if is_dev { vec![crate::Account::default()] } else { vec![] })
.with_accounts(if is_dev {
vec![
crate::Account::from(subxt_signer::eth::dev::alith()),
crate::Account::from(subxt_signer::eth::dev::baltathar()),
crate::Account::from(subxt_signer::eth::dev::charleth()),
crate::Account::from(subxt_signer::eth::dev::dorothy()),
crate::Account::from(subxt_signer::eth::dev::ethan()),
]
} else {
vec![]
})
.into_rpc();

let health_api = SystemHealthRpcServerImpl::new(client.clone()).into_rpc();
Expand Down
Loading