From f60fc5c8c80d6db2442b191c537feb2be9c25009 Mon Sep 17 00:00:00 2001 From: Agusrodri Date: Mon, 4 Nov 2024 11:14:21 -0800 Subject: [PATCH 01/11] fix some tests --- Cargo.lock | 83 ++++++++++--------- Cargo.toml | 80 +++++++++--------- .../test-precompile/test-precompile-modexp.ts | 20 +++++ .../test-precompile/test-precompile-proxy.ts | 4 +- .../test-randomness-babe-lottery2.ts | 6 +- .../test-randomness-vrf-lottery5.ts | 2 +- .../test-precompile-storage-growth.ts | 4 +- 7 files changed, 112 insertions(+), 87 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5657a4dd18f..ed2aff757fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -486,7 +486,7 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-backing-primitives" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "sp-api", "sp-consensus-slots", @@ -3088,7 +3088,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "async-trait", "fp-storage", @@ -3100,7 +3100,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "async-trait", "fp-consensus", @@ -3116,7 +3116,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "async-trait", "ethereum", @@ -3146,7 +3146,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "fc-db", "fc-storage", @@ -3169,7 +3169,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "ethereum", "ethereum-types", @@ -3223,7 +3223,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "ethereum", "ethereum-types", @@ -3238,7 +3238,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "ethereum", "ethereum-types", @@ -3428,7 +3428,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "hex", "impl-serde", @@ -3447,7 +3447,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "ethereum", "parity-scale-codec", @@ -3458,7 +3458,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "ethereum", "ethereum-types", @@ -3470,7 +3470,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "environmental", "evm", @@ -3486,7 +3486,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "ethereum", "ethereum-types", @@ -3502,7 +3502,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "frame-support", "parity-scale-codec", @@ -3514,7 +3514,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "parity-scale-codec", "serde", @@ -7571,7 +7571,7 @@ dependencies = [ [[package]] name = "nimbus-consensus" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "async-backing-primitives", "async-trait", @@ -7611,7 +7611,7 @@ dependencies = [ [[package]] name = "nimbus-primitives" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "async-trait", "frame-benchmarking", @@ -8126,7 +8126,7 @@ dependencies = [ [[package]] name = "pallet-async-backing" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -8146,7 +8146,7 @@ dependencies = [ [[package]] name = "pallet-author-inherent" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "frame-benchmarking", "frame-support", @@ -8165,7 +8165,7 @@ dependencies = [ [[package]] name = "pallet-author-mapping" version = "2.0.5" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "frame-benchmarking", "frame-support", @@ -8184,7 +8184,7 @@ dependencies = [ [[package]] name = "pallet-author-slot-filter" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "frame-benchmarking", "frame-support", @@ -8541,7 +8541,7 @@ dependencies = [ [[package]] name = "pallet-emergency-para-xcm" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -8584,7 +8584,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "environmental", "ethereum", @@ -8640,8 +8640,9 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ + "cumulus-primitives-storage-weight-reclaim", "environmental", "evm", "fp-account", @@ -8663,7 +8664,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "frame-support", "frame-system", @@ -8758,7 +8759,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "fp-evm", ] @@ -8766,7 +8767,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "fp-evm", "sp-core", @@ -8898,7 +8899,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "fp-evm", "frame-support", @@ -8974,7 +8975,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "fp-evm", "num", @@ -9219,7 +9220,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "fp-evm", "tiny-keccak", @@ -9228,7 +9229,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "fp-evm", "ripemd", @@ -9238,7 +9239,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-storage-cleaner" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "fp-evm", "frame-support", @@ -9253,7 +9254,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-xcm" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "cumulus-primitives-core", "evm", @@ -9501,7 +9502,7 @@ dependencies = [ [[package]] name = "pallet-maintenance-mode" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -9552,7 +9553,7 @@ dependencies = [ [[package]] name = "pallet-migrations" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "frame-benchmarking", "frame-support", @@ -9880,7 +9881,7 @@ dependencies = [ [[package]] name = "pallet-randomness" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "environmental", "frame-benchmarking", @@ -9955,7 +9956,7 @@ dependencies = [ [[package]] name = "pallet-relay-storage-roots" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -11976,7 +11977,7 @@ dependencies = [ [[package]] name = "precompile-utils" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "derive_more", "environmental", @@ -12005,7 +12006,7 @@ dependencies = [ [[package]] name = "precompile-utils-macro" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#439e782fb9754c38188158cd65d1eba6fe9f0e65" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" dependencies = [ "case", "num_enum 0.7.3", @@ -14815,7 +14816,7 @@ dependencies = [ [[package]] name = "session-keys-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "async-trait", "frame-support", @@ -18468,7 +18469,7 @@ dependencies = [ [[package]] name = "xcm-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" dependencies = [ "frame-support", "impl-trait-for-tuples", diff --git a/Cargo.toml b/Cargo.toml index 9ff6678e5bd..8117cdeffb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -246,41 +246,41 @@ ethereum-types = { version = "0.14", default-features = false } evm = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } evm-gasometer = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } evm-runtime = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false, features = [ +fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false, features = [ "forbid-evm-reentrancy", ] } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false, features = [ +pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false, features = [ "forbid-evm-reentrancy", ] } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-storage-cleaner = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-evm-precompile-storage-cleaner = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -precompile-utils = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -precompile-utils-macro = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +precompile-utils = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +precompile-utils-macro = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } # Frontier (client) -fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", features = [ +fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } +fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } +fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } +fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } +fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", features = [ "rpc-binary-search-estimate", ] } -fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } +fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } +fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } +fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } # Cumulus (wasm) @@ -334,23 +334,23 @@ westend-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", xcm-simulator = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-stable2407" } # Moonkit (wasm) -async-backing-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-async-backing = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-emergency-para-xcm = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-xcm = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-relay-storage-roots = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } -session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +async-backing-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-async-backing = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-emergency-para-xcm = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-evm-precompile-xcm = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-relay-storage-roots = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } # Moonkit (client) -nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407" } +nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim" } # Other (wasm) async-trait = { version = "0.1.42" } diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts index a6e89913b93..1931aa9ede6 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts @@ -89,7 +89,27 @@ describeSuite({ .viem() .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); expect(receipt.status).toBe("success"); + + console.log("GAS USED: ", receipt.gasUsed) + console.log("Num Non Zero Bytes: ", numNonZeroBytes) + console.log("Num Zero Bytes: ", numZeroBytes) + + // WITH POV CHANGE: + /* 2024-11-01 09:32:27 ACTUAL PROOF SIZE: 1943 + 2024-11-01 09:32:27 POV GAS: 31088 + 2024-11-01 09:32:27 STORAGE GAS: 0 + 2024-11-01 09:32:27 USED GAS: 23820 + 2024-11-01 09:32:27 EFFECTIVE GAS: 31088 */ + + /* 2024-11-01 09:43:23 MEASURED PROOF SIZE BEFORE: 6514 + 2024-11-01 09:43:23 ACTUAL PROOF SIZE: 790 + 2024-11-01 09:43:23 POV GAS: 12640 + 2024-11-01 09:43:23 STORAGE GAS: 0 + 2024-11-01 09:43:23 USED GAS: 23820 + 2024-11-01 09:43:23 EFFECTIVE GAS: 23820 */ + const modExpGas = + // 1088 372 21000 receipt.gasUsed - BigInt(numNonZeroBytes) * 16n - BigInt(numZeroBytes) * 4n - 21000n; expect(modExpGas, "ModExp gas pricing mismatch").to.equal(expectedModExpGasCost); }, diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts index 3d7e8eec632..2accdc29205 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts @@ -505,7 +505,9 @@ describeSuite({ // Storage growth ratio is 366 // storage_gas = 148 * 366 = 54168 // pov_gas = 5693 * 16 = 91088 - const expectedGas = 91_088n; + // Given that the remaining pov_gas is now refunded, the effective gas is + // the storage_gas = 54168. + const expectedGas = 54_168n; const rawTxn = await context.writePrecompile!({ precompileName: "Proxy", functionName: "addProxy", diff --git a/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.ts b/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.ts index 09ca9206694..416821e3902 100644 --- a/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.ts +++ b/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.ts @@ -64,7 +64,7 @@ describeSuite({ fulFillReceipt = await context .viem() .getTransactionReceipt({ hash: result![1].hash as `0x${string}` }); - expect(fulFillReceipt.gasUsed).toMatchInlineSnapshot(`280576n`); + expect(fulFillReceipt.gasUsed).toMatchInlineSnapshot(`153712n`); }); it({ @@ -175,11 +175,11 @@ describeSuite({ ).to.be.true; expect( (await context.polkadotJs().query.system.account(charleth.address)).data.free.toBigInt() > - DEFAULT_GENESIS_BALANCE + DEFAULT_GENESIS_BALANCE ).to.be.false; expect( (await context.polkadotJs().query.system.account(dorothy.address)).data.free.toBigInt() > - DEFAULT_GENESIS_BALANCE + DEFAULT_GENESIS_BALANCE ).to.be.true; }, }); diff --git a/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery5.ts b/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery5.ts index 5424b1e8e58..e0af45d07a8 100644 --- a/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery5.ts +++ b/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery5.ts @@ -63,7 +63,7 @@ describeSuite({ .viem() .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); - expect(fulFillReceipt.gasUsed).toMatchInlineSnapshot(`280576n`); + expect(fulFillReceipt.gasUsed).toMatchInlineSnapshot(`159248n`); }); it({ id: "T01", diff --git a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts index e15e487b8a9..eeb76060edb 100644 --- a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts +++ b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts @@ -21,7 +21,9 @@ describeSuite({ // Storage growth ratio is 366 // storage_gas = 148 * 366 = 54168 // pov_gas = 5693 * 16 = 91088 - const expectedGas = 91_088n; + // Given that the remaining pov_gas is now refunded, the effective gas is + // the storage_gas = 54168. + const expectedGas = 54_168n; it({ id: "T01", From 7f02cb7fc791106709d70080eb5f3168f7c48839 Mon Sep 17 00:00:00 2001 From: Agusrodri Date: Thu, 7 Nov 2024 18:05:34 -0800 Subject: [PATCH 02/11] use proper branch and fix more tests --- Cargo.lock | 82 +++++++++---------- Cargo.toml | 80 +++++++++--------- .../moonbase/test-fees/test-length-fees2.ts | 6 +- .../test-precompile-dummy-bytecode.ts | 4 +- .../test-precompile/test-precompile-modexp.ts | 20 ++--- .../test-precompile-storage-growth.ts | 2 +- 6 files changed, 98 insertions(+), 96 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed2aff757fd..e20cd8ff87c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -486,7 +486,7 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-backing-primitives" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "sp-api", "sp-consensus-slots", @@ -3088,7 +3088,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "async-trait", "fp-storage", @@ -3100,7 +3100,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "async-trait", "fp-consensus", @@ -3116,7 +3116,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "async-trait", "ethereum", @@ -3146,7 +3146,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "fc-db", "fc-storage", @@ -3169,7 +3169,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "ethereum", "ethereum-types", @@ -3223,7 +3223,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "ethereum", "ethereum-types", @@ -3238,7 +3238,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "ethereum", "ethereum-types", @@ -3428,7 +3428,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "hex", "impl-serde", @@ -3447,7 +3447,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "ethereum", "parity-scale-codec", @@ -3458,7 +3458,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "ethereum", "ethereum-types", @@ -3470,7 +3470,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "environmental", "evm", @@ -3486,7 +3486,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "ethereum", "ethereum-types", @@ -3502,7 +3502,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "frame-support", "parity-scale-codec", @@ -3514,7 +3514,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "parity-scale-codec", "serde", @@ -7571,7 +7571,7 @@ dependencies = [ [[package]] name = "nimbus-consensus" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "async-backing-primitives", "async-trait", @@ -7611,7 +7611,7 @@ dependencies = [ [[package]] name = "nimbus-primitives" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "async-trait", "frame-benchmarking", @@ -8126,7 +8126,7 @@ dependencies = [ [[package]] name = "pallet-async-backing" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -8146,7 +8146,7 @@ dependencies = [ [[package]] name = "pallet-author-inherent" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "frame-benchmarking", "frame-support", @@ -8165,7 +8165,7 @@ dependencies = [ [[package]] name = "pallet-author-mapping" version = "2.0.5" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "frame-benchmarking", "frame-support", @@ -8184,7 +8184,7 @@ dependencies = [ [[package]] name = "pallet-author-slot-filter" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "frame-benchmarking", "frame-support", @@ -8541,7 +8541,7 @@ dependencies = [ [[package]] name = "pallet-emergency-para-xcm" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -8584,7 +8584,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "environmental", "ethereum", @@ -8640,7 +8640,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "cumulus-primitives-storage-weight-reclaim", "environmental", @@ -8664,7 +8664,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "frame-support", "frame-system", @@ -8759,7 +8759,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "fp-evm", ] @@ -8767,7 +8767,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "fp-evm", "sp-core", @@ -8899,7 +8899,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "fp-evm", "frame-support", @@ -8975,7 +8975,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "fp-evm", "num", @@ -9220,7 +9220,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "fp-evm", "tiny-keccak", @@ -9229,7 +9229,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "fp-evm", "ripemd", @@ -9239,7 +9239,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-storage-cleaner" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "fp-evm", "frame-support", @@ -9254,7 +9254,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-xcm" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "cumulus-primitives-core", "evm", @@ -9502,7 +9502,7 @@ dependencies = [ [[package]] name = "pallet-maintenance-mode" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -9553,7 +9553,7 @@ dependencies = [ [[package]] name = "pallet-migrations" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "frame-benchmarking", "frame-support", @@ -9881,7 +9881,7 @@ dependencies = [ [[package]] name = "pallet-randomness" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "environmental", "frame-benchmarking", @@ -9956,7 +9956,7 @@ dependencies = [ [[package]] name = "pallet-relay-storage-roots" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -11977,7 +11977,7 @@ dependencies = [ [[package]] name = "precompile-utils" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "derive_more", "environmental", @@ -12006,7 +12006,7 @@ dependencies = [ [[package]] name = "precompile-utils-macro" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=agustin-test-pov-reclaim#ad8a0a8f688f028a07cc0dcaa7b6c82a768a0551" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" dependencies = [ "case", "num_enum 0.7.3", @@ -14816,7 +14816,7 @@ dependencies = [ [[package]] name = "session-keys-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "async-trait", "frame-support", @@ -18469,7 +18469,7 @@ dependencies = [ [[package]] name = "xcm-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=agustin-test-pov-reclaim#3c10946bb09fdaf15b0a60c0b5bc5120b4f9f025" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-stable2407#f32e4035c5b00083accd53f0f6b829feb9b88b1e" dependencies = [ "frame-support", "impl-trait-for-tuples", diff --git a/Cargo.toml b/Cargo.toml index 8117cdeffb9..9ff6678e5bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -246,41 +246,41 @@ ethereum-types = { version = "0.14", default-features = false } evm = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } evm-gasometer = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } evm-runtime = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false, features = [ +fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false, features = [ "forbid-evm-reentrancy", ] } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false, features = [ +pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false, features = [ "forbid-evm-reentrancy", ] } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-evm-precompile-storage-cleaner = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-storage-cleaner = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -precompile-utils = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } -precompile-utils-macro = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", default-features = false } +precompile-utils = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +precompile-utils-macro = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } # Frontier (client) -fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } -fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } -fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } -fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } -fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim", features = [ +fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", features = [ "rpc-binary-search-estimate", ] } -fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } -fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } -fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } -fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "agustin-test-pov-reclaim" } +fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } # Cumulus (wasm) @@ -334,23 +334,23 @@ westend-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", xcm-simulator = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-stable2407" } # Moonkit (wasm) -async-backing-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-async-backing = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-emergency-para-xcm = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-evm-precompile-xcm = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -pallet-relay-storage-roots = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } -session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim", default-features = false } +async-backing-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-async-backing = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-emergency-para-xcm = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-xcm = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-relay-storage-roots = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } +session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407", default-features = false } # Moonkit (client) -nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "agustin-test-pov-reclaim" } +nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-stable2407" } # Other (wasm) async-trait = { version = "0.1.42" } diff --git a/test/suites/dev/moonbase/test-fees/test-length-fees2.ts b/test/suites/dev/moonbase/test-fees/test-length-fees2.ts index 010710b13e2..b9958ec26de 100644 --- a/test/suites/dev/moonbase/test-fees/test-length-fees2.ts +++ b/test/suites/dev/moonbase/test-fees/test-length-fees2.ts @@ -60,8 +60,10 @@ describeSuite({ const base_ethereum_fee = 21000n; const modexp_min_cost = 200n * 20n; // see MIN_GAS_COST in frontier's modexp precompile const entire_fee = non_zero_byte_fee + zero_byte_fee + base_ethereum_fee + modexp_min_cost; - // the gas used should be the maximum of the legacy gas and the pov gas - const expected = BigInt(Math.max(Number(entire_fee), 3797 * GAS_LIMIT_POV_RATIO)); + console.log("ENTIRE FEE: ", entire_fee); + // Given that the pov is refunded, the gas used should be the minimum of the legacy gas + // and the pov gas. + const expected = BigInt(Math.min(Number(entire_fee), 3797 * GAS_LIMIT_POV_RATIO)); expect(receipt.gasUsed, "gasUsed does not match manual calculation").toBe(expected); }, }); diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts index b3726b6ed4c..40184ded181 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts @@ -99,8 +99,8 @@ describeSuite({ .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); expect(receipt.status).to.equal("reverted"); - // 21006 = call cost + 2*PUSH cost - expect(receipt.gasUsed).to.equal(21006n); + // 31088 = call cost + 2*PUSH cost + expect(receipt.gasUsed).to.equal(31088n); }, }); }, diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts index 1931aa9ede6..aab28137f9b 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts @@ -65,7 +65,7 @@ describeSuite({ id: "T03", title: "EIP example 1 - gas", test: async function () { - const expectedModExpGasCost = 1360n; + const expectedModExpGasCost = 9156n; const inputData = "0000000000000000000000000000000000000000000000000000000000000001" + // base length "0000000000000000000000000000000000000000000000000000000000000020" + // exponent length @@ -145,7 +145,7 @@ describeSuite({ id: "T05", title: "EIP example 2 - gas", test: async function () { - const expectedModExpGasCost = 1360n; + const expectedModExpGasCost = 8656n; const inputData = "0000000000000000000000000000000000000000000000000000000000000000" + // base length "0000000000000000000000000000000000000000000000000000000000000020" + // exponent length @@ -178,7 +178,7 @@ describeSuite({ id: "T06", title: "nagydani-1-square - gas", test: async function () { - const expectedModExpGasCost = 200n; + const expectedModExpGasCost = 7604n; const inputData = "0000000000000000000000000000000000000000000000000000000000000040" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -213,7 +213,7 @@ describeSuite({ id: "T07", title: "nagydani-1-qube - gas", test: async function () { - const expectedModExpGasCost = 200n; + const expectedModExpGasCost = 7604n; const inputData = "0000000000000000000000000000000000000000000000000000000000000040" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -247,7 +247,7 @@ describeSuite({ id: "T08", title: "nagydani-1-pow0x10001 - gas", test: async function () { - const expectedModExpGasCost = 341n; + const expectedModExpGasCost = 7584n; const inputData = "0000000000000000000000000000000000000000000000000000000000000040" + // base length "0000000000000000000000000000000000000000000000000000000000000003" + // exponent length @@ -281,7 +281,7 @@ describeSuite({ id: "T09", title: "nagydani-2-square - gas", test: async function () { - const expectedModExpGasCost = 200n; + const expectedModExpGasCost = 5592n; const inputData = "0000000000000000000000000000000000000000000000000000000000000080" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -315,7 +315,7 @@ describeSuite({ id: "T10", title: "nagydani-2-qube - gas", test: async function () { - const expectedModExpGasCost = 200n; + const expectedModExpGasCost = 5592n; const inputData = "0000000000000000000000000000000000000000000000000000000000000080" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -349,7 +349,7 @@ describeSuite({ id: "T11", title: "nagydani-2-pow0x10001 - gas", test: async function () { - const expectedModExpGasCost = 1365n; + const expectedModExpGasCost = 5572n; const inputData = "0000000000000000000000000000000000000000000000000000000000000080" + // base length "0000000000000000000000000000000000000000000000000000000000000003" + // exponent length @@ -383,7 +383,7 @@ describeSuite({ id: "T12", title: "nagydani-3-square - gas", test: async function () { - const expectedModExpGasCost = 341n; + const expectedModExpGasCost = 1472n; const inputData = "0000000000000000000000000000000000000000000000000000000000000100" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -417,7 +417,7 @@ describeSuite({ id: "T13", title: "nagydani-3-qube - gas", test: async function () { - const expectedModExpGasCost = 341n; + const expectedModExpGasCost = 1472n; const inputData = "0000000000000000000000000000000000000000000000000000000000000100" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length diff --git a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts index eeb76060edb..f8b5fa926f0 100644 --- a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts +++ b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts @@ -90,7 +90,7 @@ describeSuite({ ], privateKey: BALTATHAR_PRIVATE_KEY, rawTxOnly: true, - gas: expectedGas, + gas: 91_088n, }); const { result } = await context.createBlock(rawTxn2); From aa96dd4650097aa852f427b9ad3624d9c1bfed3b Mon Sep 17 00:00:00 2001 From: Agusrodri Date: Thu, 7 Nov 2024 18:08:55 -0800 Subject: [PATCH 03/11] cleanup --- .../moonbase/test-fees/test-length-fees2.ts | 1 - .../test-precompile/test-precompile-modexp.ts | 19 ------------------- 2 files changed, 20 deletions(-) diff --git a/test/suites/dev/moonbase/test-fees/test-length-fees2.ts b/test/suites/dev/moonbase/test-fees/test-length-fees2.ts index b9958ec26de..cb58d3dfb13 100644 --- a/test/suites/dev/moonbase/test-fees/test-length-fees2.ts +++ b/test/suites/dev/moonbase/test-fees/test-length-fees2.ts @@ -60,7 +60,6 @@ describeSuite({ const base_ethereum_fee = 21000n; const modexp_min_cost = 200n * 20n; // see MIN_GAS_COST in frontier's modexp precompile const entire_fee = non_zero_byte_fee + zero_byte_fee + base_ethereum_fee + modexp_min_cost; - console.log("ENTIRE FEE: ", entire_fee); // Given that the pov is refunded, the gas used should be the minimum of the legacy gas // and the pov gas. const expected = BigInt(Math.min(Number(entire_fee), 3797 * GAS_LIMIT_POV_RATIO)); diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts index aab28137f9b..e6209267f15 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts @@ -90,26 +90,7 @@ describeSuite({ .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); expect(receipt.status).toBe("success"); - console.log("GAS USED: ", receipt.gasUsed) - console.log("Num Non Zero Bytes: ", numNonZeroBytes) - console.log("Num Zero Bytes: ", numZeroBytes) - - // WITH POV CHANGE: - /* 2024-11-01 09:32:27 ACTUAL PROOF SIZE: 1943 - 2024-11-01 09:32:27 POV GAS: 31088 - 2024-11-01 09:32:27 STORAGE GAS: 0 - 2024-11-01 09:32:27 USED GAS: 23820 - 2024-11-01 09:32:27 EFFECTIVE GAS: 31088 */ - - /* 2024-11-01 09:43:23 MEASURED PROOF SIZE BEFORE: 6514 - 2024-11-01 09:43:23 ACTUAL PROOF SIZE: 790 - 2024-11-01 09:43:23 POV GAS: 12640 - 2024-11-01 09:43:23 STORAGE GAS: 0 - 2024-11-01 09:43:23 USED GAS: 23820 - 2024-11-01 09:43:23 EFFECTIVE GAS: 23820 */ - const modExpGas = - // 1088 372 21000 receipt.gasUsed - BigInt(numNonZeroBytes) * 16n - BigInt(numZeroBytes) * 4n - 21000n; expect(modExpGas, "ModExp gas pricing mismatch").to.equal(expectedModExpGasCost); }, From a5aa3eaa7986554820f02a709d4985c75fdfeec2 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Sun, 24 Nov 2024 22:05:36 +0000 Subject: [PATCH 04/11] Handle RecordRefund event to proper account PoV gas --- client/evm-tracing/src/listeners/call_list.rs | 14 ++++++++++++++ runtime/common/src/{apis.rs => apis/mod.rs} | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) rename runtime/common/src/{apis.rs => apis/mod.rs} (98%) diff --git a/client/evm-tracing/src/listeners/call_list.rs b/client/evm-tracing/src/listeners/call_list.rs index d37ce41af59..f01dfda11cd 100644 --- a/client/evm-tracing/src/listeners/call_list.rs +++ b/client/evm-tracing/src/listeners/call_list.rs @@ -236,6 +236,20 @@ impl Listener { context.gas = snapshot.gas(); } } + GasometerEvent::RecordRefund { snapshot, refund } => { + // Probably not the best solution, but for now we need to record the PoV gas refund + // which is emitted after EvmEvent::Exit + if self.context_stack.is_empty() { + if let Some(entry) = self.entries.last_mut() { + if let Some(call) = + entry.get_mut(&(self.entries_next_index.saturating_sub(1))) + { + call.gas_used = + call.gas_used.saturating_add(U256::from(refund.clone())); + } + } + } + } GasometerEvent::RecordTransaction { cost, .. } => { self.transaction_cost = cost; self.record_transaction_event_only = true; diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis/mod.rs similarity index 98% rename from runtime/common/src/apis.rs rename to runtime/common/src/apis/mod.rs index 144a82f9667..d4a92789930 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis/mod.rs @@ -14,6 +14,24 @@ // You should have received a copy of the GNU General Public License // along with Moonbeam. If not, see . + +impl sp_api::ConstructRuntimeApi for RuntimeApi where C: sp_api::CallApiAt + 'static { + type RuntimeApi = RuntimeApiImpl; + + fn construct_runtime_api<'a>(call: &'a C) -> sp_api::ApiRef<'a, RuntimeApi> { + use core::default::Default; + RuntimeApiImpl { + call: unsafe { core::mem::transmute(call) }, + transaction_depth: 0.into(), + changes: Default::default(), + recorder: Default::default(), + call_context: sp_core::traits::CallContext::Offchain, + extensions: Default::default(), + extensions_generated_for: Default::default() + }.into() + } +} + #[macro_export] macro_rules! impl_runtime_apis_plus_common { {$($custom:tt)*} => { From c223627d2c8c0f19fb81675fb50105a08e99387d Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 25 Nov 2024 07:50:15 +0000 Subject: [PATCH 05/11] fix code --- runtime/common/src/apis/mod.rs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/runtime/common/src/apis/mod.rs b/runtime/common/src/apis/mod.rs index d4a92789930..144a82f9667 100644 --- a/runtime/common/src/apis/mod.rs +++ b/runtime/common/src/apis/mod.rs @@ -14,24 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Moonbeam. If not, see . - -impl sp_api::ConstructRuntimeApi for RuntimeApi where C: sp_api::CallApiAt + 'static { - type RuntimeApi = RuntimeApiImpl; - - fn construct_runtime_api<'a>(call: &'a C) -> sp_api::ApiRef<'a, RuntimeApi> { - use core::default::Default; - RuntimeApiImpl { - call: unsafe { core::mem::transmute(call) }, - transaction_depth: 0.into(), - changes: Default::default(), - recorder: Default::default(), - call_context: sp_core::traits::CallContext::Offchain, - extensions: Default::default(), - extensions_generated_for: Default::default() - }.into() - } -} - #[macro_export] macro_rules! impl_runtime_apis_plus_common { {$($custom:tt)*} => { From 4a14be10e7382de87ee003e18b14cd13a1c56673 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 25 Nov 2024 11:10:02 +0000 Subject: [PATCH 06/11] Update frontier pin and enable proof recording --- Cargo.lock | 55 ++++++++++--------- client/evm-tracing/src/listeners/call_list.rs | 12 +++- client/rpc/debug/Cargo.toml | 2 + client/rpc/debug/src/lib.rs | 30 +++++++++- 4 files changed, 67 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e20cd8ff87c..361ca60dd49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3088,7 +3088,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "async-trait", "fp-storage", @@ -3100,7 +3100,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "async-trait", "fp-consensus", @@ -3116,7 +3116,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "async-trait", "ethereum", @@ -3146,7 +3146,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "fc-db", "fc-storage", @@ -3169,7 +3169,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "ethereum", "ethereum-types", @@ -3215,6 +3215,7 @@ dependencies = [ "sp-state-machine", "sp-storage", "sp-timestamp", + "sp-trie", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -3223,7 +3224,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "ethereum", "ethereum-types", @@ -3238,7 +3239,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "ethereum", "ethereum-types", @@ -3428,7 +3429,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "hex", "impl-serde", @@ -3447,7 +3448,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "ethereum", "parity-scale-codec", @@ -3458,7 +3459,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "ethereum", "ethereum-types", @@ -3470,7 +3471,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "environmental", "evm", @@ -3486,7 +3487,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "ethereum", "ethereum-types", @@ -3502,7 +3503,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "frame-support", "parity-scale-codec", @@ -3514,7 +3515,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "parity-scale-codec", "serde", @@ -6604,6 +6605,7 @@ dependencies = [ "futures 0.3.30", "hex-literal 0.4.1", "jsonrpsee", + "log", "moonbeam-client-evm-tracing", "moonbeam-rpc-core-debug", "moonbeam-rpc-core-types", @@ -6616,6 +6618,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-trie", "tokio", ] @@ -8584,7 +8587,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "environmental", "ethereum", @@ -8640,7 +8643,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "cumulus-primitives-storage-weight-reclaim", "environmental", @@ -8664,7 +8667,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "frame-support", "frame-system", @@ -8759,7 +8762,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "fp-evm", ] @@ -8767,7 +8770,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "fp-evm", "sp-core", @@ -8899,7 +8902,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "fp-evm", "frame-support", @@ -8975,7 +8978,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "fp-evm", "num", @@ -9220,7 +9223,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "fp-evm", "tiny-keccak", @@ -9229,7 +9232,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "fp-evm", "ripemd", @@ -9239,7 +9242,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-storage-cleaner" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "fp-evm", "frame-support", @@ -11977,7 +11980,7 @@ dependencies = [ [[package]] name = "precompile-utils" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "derive_more", "environmental", @@ -12006,7 +12009,7 @@ dependencies = [ [[package]] name = "precompile-utils-macro" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" dependencies = [ "case", "num_enum 0.7.3", diff --git a/client/evm-tracing/src/listeners/call_list.rs b/client/evm-tracing/src/listeners/call_list.rs index f01dfda11cd..b83d40cef98 100644 --- a/client/evm-tracing/src/listeners/call_list.rs +++ b/client/evm-tracing/src/listeners/call_list.rs @@ -236,7 +236,7 @@ impl Listener { context.gas = snapshot.gas(); } } - GasometerEvent::RecordRefund { snapshot, refund } => { + GasometerEvent::RecordRefund { refund, .. } => { // Probably not the best solution, but for now we need to record the PoV gas refund // which is emitted after EvmEvent::Exit if self.context_stack.is_empty() { @@ -244,8 +244,14 @@ impl Listener { if let Some(call) = entry.get_mut(&(self.entries_next_index.saturating_sub(1))) { - call.gas_used = - call.gas_used.saturating_add(U256::from(refund.clone())); + // The refund will be: + // - [- Negative] if extra gas needs to be accounted + // - [+ Positive] if less gas needs to be accounted + call.gas_used = if refund.is_negative() { + call.gas_used.saturating_add(U256::from(refund.abs())) + } else { + call.gas_used.saturating_sub(U256::from(refund)) + } } } } diff --git a/client/rpc/debug/Cargo.toml b/client/rpc/debug/Cargo.toml index f4fbfcc7d5f..3d46b9209a7 100644 --- a/client/rpc/debug/Cargo.toml +++ b/client/rpc/debug/Cargo.toml @@ -12,6 +12,7 @@ futures = { workspace = true, features = [ "compat" ] } hex-literal = { workspace = true } jsonrpsee = { workspace = true, features = [ "macros", "server" ] } tokio = { workspace = true, features = [ "sync", "time" ] } +log = { workspace = true } # Moonbeam moonbeam-client-evm-tracing = { workspace = true } @@ -28,6 +29,7 @@ sp-blockchain = { workspace = true } sp-core = { workspace = true, features = [ "std" ] } sp-io = { workspace = true, features = [ "std" ] } sp-runtime = { workspace = true, features = [ "std" ] } +sp-trie = { workspace = true, features = [ "std" ] } # Frontier ethereum = { workspace = true, features = [ "std", "with-codec" ] } diff --git a/client/rpc/debug/src/lib.rs b/client/rpc/debug/src/lib.rs index 9a653bd659e..32517614c22 100644 --- a/client/rpc/debug/src/lib.rs +++ b/client/rpc/debug/src/lib.rs @@ -392,7 +392,15 @@ where }?; // Get ApiRef. This handle allow to keep changes between txs in an internal buffer. - let api = client.runtime_api(); + let mut api = client.runtime_api(); + + // Enable proof recording + api.record_proof(); + api.proof_recorder().map(|recorder| { + let ext = sp_trie::proof_size_extension::ProofSizeExt::new(recorder); + api.register_extension(ext); + }); + // Get Blockchain backend let blockchain = backend.blockchain(); // Get the header I want to work with. @@ -556,7 +564,15 @@ where Err(e) => return Err(e), }; // Get ApiRef. This handle allow to keep changes between txs in an internal buffer. - let api = client.runtime_api(); + let mut api = client.runtime_api(); + + // Enable proof recording + api.record_proof(); + api.proof_recorder().map(|recorder| { + let ext = sp_trie::proof_size_extension::ProofSizeExt::new(recorder); + api.register_extension(ext); + }); + // Get Blockchain backend let blockchain = backend.blockchain(); // Get the header I want to work with. @@ -762,7 +778,15 @@ where }?; // Get ApiRef. This handle allow to keep changes between txs in an internal buffer. - let api = client.runtime_api(); + let mut api = client.runtime_api(); + + // Enable proof recording + api.record_proof(); + api.proof_recorder().map(|recorder| { + let ext = sp_trie::proof_size_extension::ProofSizeExt::new(recorder); + api.register_extension(ext); + }); + // Get the header I want to work with. let Ok(hash) = client.expect_block_hash_from_id(&reference_id) else { return Err(internal_err("Block header not found")); From 078f054175d5be56bb6099d5df54d56e4f3d1a79 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 27 Nov 2024 10:08:56 +0000 Subject: [PATCH 07/11] fix tests --- Cargo.lock | 386 +++++++++++------- Cargo.toml | 50 +-- client/evm-tracing/src/listeners/call_list.rs | 20 - client/rpc/debug/Cargo.toml | 1 - runtime/common/src/{apis/mod.rs => apis.rs} | 0 .../test-transaction-with-metadata-hash.ts | 19 +- .../__snapshots__/test-length-fees2.ts.snap | 3 + .../moonbase/test-fees/test-length-fees2.ts | 8 +- .../test-gas-estimation-multiply.ts.snap | 9 + .../test-gas/test-gas-estimation-contracts.ts | 22 +- .../test-gas/test-gas-estimation-multiply.ts | 11 +- .../test-precompile-assets-erc20d.ts.snap | 3 + .../test-precompile-dummy-bytecode.ts.snap | 3 + .../test-precompile-assets-erc20d.ts | 14 + .../test-precompile-dummy-bytecode.ts | 4 +- .../test-precompile/test-precompile-modexp.ts | 23 +- .../test-precompile/test-precompile-proxy.ts | 10 +- .../test-randomness-babe-lottery2.ts | 8 +- .../test-randomness-babe-lottery3.ts | 2 +- .../test-randomness-vrf-lottery4.ts | 2 +- .../test-randomness-vrf-lottery5.ts | 4 +- .../test-precompile-storage-growth.ts.snap | 9 + .../test-precompile-storage-growth.ts | 69 +++- 23 files changed, 436 insertions(+), 244 deletions(-) rename runtime/common/src/{apis/mod.rs => apis.rs} (100%) create mode 100644 test/suites/dev/moonbase/test-fees/__snapshots__/test-length-fees2.ts.snap create mode 100644 test/suites/dev/moonbase/test-gas/__snapshots__/test-gas-estimation-multiply.ts.snap create mode 100644 test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-assets-erc20d.ts.snap create mode 100644 test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-dummy-bytecode.ts.snap create mode 100644 test/suites/dev/moonbase/test-storage-growth/__snapshots__/test-precompile-storage-growth.ts.snap diff --git a/Cargo.lock b/Cargo.lock index 361ca60dd49..2921119deec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3088,7 +3088,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "async-trait", "fp-storage", @@ -3100,7 +3100,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "async-trait", "fp-consensus", @@ -3116,7 +3116,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "async-trait", "ethereum", @@ -3146,7 +3146,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "fc-db", "fc-storage", @@ -3169,7 +3169,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "ethereum", "ethereum-types", @@ -3178,7 +3178,7 @@ dependencies = [ "fc-mapping-sync", "fc-rpc-core", "fc-storage", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "fp-rpc", "fp-storage", "futures 0.3.30", @@ -3186,7 +3186,7 @@ dependencies = [ "jsonrpsee", "libsecp256k1", "log", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "parity-scale-codec", "prometheus", "rand 0.8.5", @@ -3224,7 +3224,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "ethereum", "ethereum-types", @@ -3239,7 +3239,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "ethereum", "ethereum-types", @@ -3429,7 +3429,26 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +dependencies = [ + "hex", + "impl-serde", + "libsecp256k1", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "staging-xcm", +] + +[[package]] +name = "fp-account" +version = "1.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "hex", "impl-serde", @@ -3448,7 +3467,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "ethereum", "parity-scale-codec", @@ -3459,19 +3478,35 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "ethereum", "ethereum-types", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "frame-support", + "parity-scale-codec", +] + +[[package]] +name = "fp-evm" +version = "3.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +dependencies = [ + "environmental", + "evm", "frame-support", + "num_enum 0.7.3", "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", ] [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "environmental", "evm", @@ -3487,11 +3522,11 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "ethereum", "ethereum-types", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "parity-scale-codec", "scale-info", "sp-api", @@ -3503,7 +3538,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "frame-support", "parity-scale-codec", @@ -3515,7 +3550,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "parity-scale-codec", "serde", @@ -6211,7 +6246,7 @@ dependencies = [ "cumulus-test-relay-sproof-builder", "ethereum", "evm-tracing-events", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -6249,7 +6284,7 @@ dependencies = [ "pallet-erc20-xcm-bridge", "pallet-ethereum", "pallet-ethereum-xcm", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-evm-chain-id", "pallet-evm-precompile-author-mapping", "pallet-evm-precompile-balances-erc20", @@ -6319,7 +6354,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "precompile-foreign-asset-migrator", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rlp", "scale-info", "serde", @@ -6474,9 +6509,9 @@ dependencies = [ "evm-gasometer", "evm-runtime", "evm-tracing-events", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "moonbeam-primitives-ext", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "parity-scale-codec", "sp-core", "sp-io", @@ -6605,7 +6640,6 @@ dependencies = [ "futures 0.3.30", "hex-literal 0.4.1", "jsonrpsee", - "log", "moonbeam-client-evm-tracing", "moonbeam-rpc-core-debug", "moonbeam-rpc-core-types", @@ -6727,7 +6761,7 @@ dependencies = [ "cumulus-test-relay-sproof-builder", "ethereum", "evm-tracing-events", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -6765,7 +6799,7 @@ dependencies = [ "pallet-erc20-xcm-bridge", "pallet-ethereum", "pallet-ethereum-xcm", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-evm-chain-id", "pallet-evm-precompile-author-mapping", "pallet-evm-precompile-balances-erc20", @@ -6832,7 +6866,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rlp", "scale-info", "serde", @@ -6876,7 +6910,7 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "cumulus-primitives-storage-weight-reclaim", "fp-ethereum", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-benchmarking", "frame-support", "frame-system", @@ -6898,7 +6932,7 @@ dependencies = [ "pallet-conviction-voting", "pallet-crowdloan-rewards", "pallet-ethereum-xcm", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-evm-chain-id", "pallet-identity", "pallet-message-queue", @@ -6926,7 +6960,7 @@ dependencies = [ "pallet-xcm-transactor", "pallet-xcm-weight-trader", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "sp-api", "sp-consensus-slots", @@ -7157,7 +7191,7 @@ dependencies = [ "cumulus-test-relay-sproof-builder", "ethereum", "evm-tracing-events", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -7195,7 +7229,7 @@ dependencies = [ "pallet-erc20-xcm-bridge", "pallet-ethereum", "pallet-ethereum-xcm", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-evm-chain-id", "pallet-evm-precompile-author-mapping", "pallet-evm-precompile-balances-erc20", @@ -7262,7 +7296,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rlp", "scale-info", "serde", @@ -8566,12 +8600,12 @@ version = "1.0.0" dependencies = [ "environmental", "ethereum-types", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "log", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "parity-scale-codec", "scale-info", @@ -8587,7 +8621,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "environmental", "ethereum", @@ -8595,12 +8629,12 @@ dependencies = [ "evm", "fp-consensus", "fp-ethereum", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "fp-rpc", "fp-storage", "frame-support", "frame-system", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "parity-scale-codec", "scale-info", "sp-io", @@ -8615,7 +8649,7 @@ dependencies = [ "ethereum", "ethereum-types", "fp-ethereum", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -8625,7 +8659,7 @@ dependencies = [ "libsecp256k1", "pallet-balances", "pallet-ethereum", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-evm-precompile-proxy", "pallet-proxy", "pallet-timestamp", @@ -8643,13 +8677,37 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +dependencies = [ + "cumulus-primitives-storage-weight-reclaim", + "environmental", + "evm", + "fp-account 1.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", + "frame-benchmarking", + "frame-support", + "frame-system", + "hash-db", + "hex-literal 0.4.1", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-evm" +version = "6.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "cumulus-primitives-storage-weight-reclaim", "environmental", "evm", - "fp-account", - "fp-evm", + "fp-account 1.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-benchmarking", "frame-support", "frame-system", @@ -8667,7 +8725,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "frame-support", "frame-system", @@ -8680,7 +8738,7 @@ name = "pallet-evm-precompile-author-mapping" version = "0.2.0" dependencies = [ "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8689,11 +8747,11 @@ dependencies = [ "num_enum 0.5.11", "pallet-author-mapping", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sp-core", @@ -8708,7 +8766,7 @@ version = "0.1.0" dependencies = [ "account", "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8716,11 +8774,11 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sha3", @@ -8737,18 +8795,18 @@ version = "0.1.0" dependencies = [ "derive_more", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sha3", @@ -8762,17 +8820,17 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", ] [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "sp-core", "substrate-bn", ] @@ -8783,7 +8841,7 @@ version = "0.1.0" dependencies = [ "derive_more", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8791,11 +8849,11 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sha3", @@ -8813,7 +8871,7 @@ dependencies = [ "account", "derive_more", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8821,12 +8879,12 @@ dependencies = [ "num_enum 0.5.11", "pallet-balances", "pallet-collective", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "pallet-treasury", "parity-scale-codec", "paste", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sha3", @@ -8845,7 +8903,7 @@ version = "0.1.0" dependencies = [ "account", "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8853,10 +8911,10 @@ dependencies = [ "num_enum 0.5.11", "pallet-balances", "pallet-conviction-voting", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rustc-hex", "scale-info", "serde", @@ -8876,19 +8934,19 @@ dependencies = [ "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "log", "num_enum 0.5.11", "pallet-balances", "pallet-crowdloan-rewards", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-message-queue", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rustc-hex", "scale-info", "serde", @@ -8902,11 +8960,11 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "parity-scale-codec", "sp-runtime", ] @@ -8919,7 +8977,7 @@ dependencies = [ "cumulus-primitives-core", "derive_more", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex", @@ -8927,13 +8985,13 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "pallet-xcm", "pallet-xcm-transactor", "parity-scale-codec", "paste", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sha3", @@ -8954,18 +9012,18 @@ version = "0.1.0" dependencies = [ "enumflags2", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex", "hex-literal 0.4.1", "log", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-identity", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sha3", @@ -8978,9 +9036,9 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "num", ] @@ -8988,11 +9046,11 @@ dependencies = [ name = "pallet-evm-precompile-p256verify" version = "0.1.0" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "hex-literal 0.4.1", "p256", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", ] [[package]] @@ -9000,17 +9058,17 @@ name = "pallet-evm-precompile-parachain-staking" version = "1.0.0" dependencies = [ "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-parachain-staking", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rustc-hex", "scale-info", "serde", @@ -9027,18 +9085,18 @@ name = "pallet-evm-precompile-preimage" version = "0.1.0" dependencies = [ "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-preimage", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rustc-hex", "scale-info", "serde", @@ -9056,18 +9114,18 @@ dependencies = [ "account", "derive_more", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-proxy", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rustc-hex", "scale-info", "serde", @@ -9083,7 +9141,7 @@ name = "pallet-evm-precompile-randomness" version = "0.1.0" dependencies = [ "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -9092,12 +9150,12 @@ dependencies = [ "num_enum 0.5.11", "pallet-author-mapping", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-randomness", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "session-keys-primitives", "sp-core", @@ -9111,20 +9169,20 @@ name = "pallet-evm-precompile-referenda" version = "0.1.0" dependencies = [ "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-preimage", "pallet-referenda", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rustc-hex", "scale-info", "serde", @@ -9140,17 +9198,17 @@ name = "pallet-evm-precompile-registry" version = "0.1.0" dependencies = [ "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sp-core", @@ -9166,20 +9224,20 @@ dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-message-queue", "pallet-staking", "pallet-timestamp", "pallet-xcm-transactor", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rustc-hex", "scale-info", "serde", @@ -9200,18 +9258,18 @@ version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex", "moonbeam-runtime-common", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-precompile-benchmarks", "pallet-relay-storage-roots", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "sp-core", "sp-io", @@ -9223,18 +9281,18 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "tiny-keccak", ] [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "ripemd", "sp-io", ] @@ -9242,14 +9300,14 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-storage-cleaner" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "sp-core", "sp-runtime", ] @@ -9261,15 +9319,15 @@ source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot- dependencies = [ "cumulus-primitives-core", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", "frame-support", "frame-system", "log", "num_enum 0.7.3", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", "pallet-xcm", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", "scale-info", "sp-core", "sp-runtime", @@ -9287,18 +9345,18 @@ dependencies = [ "cumulus-primitives-core", "derive_more", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "pallet-xcm", "pallet-xcm-transactor", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rustc-hex", "scale-info", "serde", @@ -9320,17 +9378,17 @@ version = "0.1.0" dependencies = [ "cumulus-primitives-core", "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "pallet-xcm", "parity-scale-codec", "polkadot-parachain-primitives", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sha3", @@ -9352,18 +9410,18 @@ dependencies = [ "account", "cumulus-primitives-core", "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "pallet-xcm", "pallet-xcm-transactor", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "rustc-hex", "scale-info", "serde", @@ -9385,7 +9443,7 @@ version = "0.1.0" dependencies = [ "account", "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -9394,11 +9452,11 @@ dependencies = [ "num_enum 0.5.11", "pallet-assets", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sha3", @@ -9594,18 +9652,18 @@ name = "pallet-moonbeam-foreign-assets" version = "0.1.0" dependencies = [ "ethereum-types", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-benchmarking", "frame-support", "frame-system", "hex", "log", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-timestamp", "parity-scale-codec", - "precompile-utils", - "precompile-utils-macro", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils-macro 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "sp-core", "sp-io", @@ -9626,7 +9684,7 @@ dependencies = [ "log", "pallet-assets", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", @@ -9819,14 +9877,14 @@ version = "0.1.0" dependencies = [ "cumulus-primitives-core", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-benchmarking", "frame-support", "frame-system", "pallet-evm-precompile-p256verify", "pallet-relay-storage-roots", "parity-scale-codec", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "sp-core", "sp-std", @@ -11950,7 +12008,7 @@ version = "0.1.0" dependencies = [ "account", "derive_more", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -11960,12 +12018,12 @@ dependencies = [ "pallet-asset-manager", "pallet-assets", "pallet-balances", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "pallet-moonbeam-foreign-assets", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "sha3", @@ -11980,12 +12038,36 @@ dependencies = [ [[package]] name = "precompile-utils" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +dependencies = [ + "environmental", + "evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", + "frame-support", + "frame-system", + "hex", + "impl-trait-for-tuples", + "log", + "num_enum 0.7.3", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", + "parity-scale-codec", + "precompile-utils-macro 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", +] + +[[package]] +name = "precompile-utils" +version = "0.1.0" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "derive_more", "environmental", "evm", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "frame-support", "frame-system", "hex", @@ -11993,9 +12075,9 @@ dependencies = [ "impl-trait-for-tuples", "log", "num_enum 0.7.3", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "parity-scale-codec", - "precompile-utils-macro", + "precompile-utils-macro 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "scale-info", "serde", "similar-asserts", @@ -12009,7 +12091,21 @@ dependencies = [ [[package]] name = "precompile-utils-macro" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#fcd974a2480cde00da2f590d021f41041a8c7905" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +dependencies = [ + "case", + "num_enum 0.7.3", + "prettyplease 0.2.22", + "proc-macro2", + "quote", + "sp-crypto-hashing", + "syn 1.0.109", +] + +[[package]] +name = "precompile-utils-macro" +version = "0.1.0" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" dependencies = [ "case", "num_enum 0.7.3", @@ -16586,7 +16682,7 @@ dependencies = [ "moonbase-runtime", "moonbeam-runtime", "moonriver-runtime", - "precompile-utils", + "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", "serde_json", ] diff --git a/Cargo.toml b/Cargo.toml index 9ff6678e5bd..d7a1189d624 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -246,41 +246,41 @@ ethereum-types = { version = "0.14", default-features = false } evm = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } evm-gasometer = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } evm-runtime = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false, features = [ +fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false, features = [ "forbid-evm-reentrancy", ] } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false, features = [ +pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false, features = [ "forbid-evm-reentrancy", ] } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -pallet-evm-precompile-storage-cleaner = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +pallet-evm-precompile-storage-cleaner = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -precompile-utils = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -precompile-utils-macro = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +precompile-utils = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +precompile-utils-macro = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } # Frontier (client) -fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", features = [ +fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } +fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } +fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } +fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } +fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", features = [ "rpc-binary-search-estimate", ] } -fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } -fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } +fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } +fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } +fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } # Cumulus (wasm) diff --git a/client/evm-tracing/src/listeners/call_list.rs b/client/evm-tracing/src/listeners/call_list.rs index b83d40cef98..d37ce41af59 100644 --- a/client/evm-tracing/src/listeners/call_list.rs +++ b/client/evm-tracing/src/listeners/call_list.rs @@ -236,26 +236,6 @@ impl Listener { context.gas = snapshot.gas(); } } - GasometerEvent::RecordRefund { refund, .. } => { - // Probably not the best solution, but for now we need to record the PoV gas refund - // which is emitted after EvmEvent::Exit - if self.context_stack.is_empty() { - if let Some(entry) = self.entries.last_mut() { - if let Some(call) = - entry.get_mut(&(self.entries_next_index.saturating_sub(1))) - { - // The refund will be: - // - [- Negative] if extra gas needs to be accounted - // - [+ Positive] if less gas needs to be accounted - call.gas_used = if refund.is_negative() { - call.gas_used.saturating_add(U256::from(refund.abs())) - } else { - call.gas_used.saturating_sub(U256::from(refund)) - } - } - } - } - } GasometerEvent::RecordTransaction { cost, .. } => { self.transaction_cost = cost; self.record_transaction_event_only = true; diff --git a/client/rpc/debug/Cargo.toml b/client/rpc/debug/Cargo.toml index 3d46b9209a7..dc2944dc9c3 100644 --- a/client/rpc/debug/Cargo.toml +++ b/client/rpc/debug/Cargo.toml @@ -12,7 +12,6 @@ futures = { workspace = true, features = [ "compat" ] } hex-literal = { workspace = true } jsonrpsee = { workspace = true, features = [ "macros", "server" ] } tokio = { workspace = true, features = [ "sync", "time" ] } -log = { workspace = true } # Moonbeam moonbeam-client-evm-tracing = { workspace = true } diff --git a/runtime/common/src/apis/mod.rs b/runtime/common/src/apis.rs similarity index 100% rename from runtime/common/src/apis/mod.rs rename to runtime/common/src/apis.rs diff --git a/test/suites/dev/common/test-transaction/test-transaction-with-metadata-hash.ts b/test/suites/dev/common/test-transaction/test-transaction-with-metadata-hash.ts index b1f71d34751..dab9f57be39 100644 --- a/test/suites/dev/common/test-transaction/test-transaction-with-metadata-hash.ts +++ b/test/suites/dev/common/test-transaction/test-transaction-with-metadata-hash.ts @@ -20,6 +20,13 @@ async function metadataHash(api: ApiPromise) { return u8aToHex(merkleizedMetadata.digest()); } +async function isMetadataHashEnabled(api: ApiPromise) { + const metadata = await api.rpc.state.getMetadata(); + return metadata.asLatest.extrinsic.signedExtensions.some( + (ext) => ext.identifier.toString() === "CheckMetadataHash" + ); +} + describeSuite({ id: "D010501", title: "Test transaction with metadata hash", @@ -28,7 +35,11 @@ describeSuite({ it({ id: "T01", title: "Should fail with an invalid metadata hash", - test: async function () { + test: async function (ctx) { + if (!(await isMetadataHashEnabled(context.polkadotJs()))) { + ctx.skip(); + } + const withMetadataOpts: Partial = { mode: 1, metadataHash: "0x" + "00".repeat(32), @@ -48,7 +59,11 @@ describeSuite({ it({ id: "T02", title: "Should succeed with a valid metadata hash", - test: async function () { + test: async function (ctx) { + if (!(await isMetadataHashEnabled(context.polkadotJs()))) { + ctx.skip(); + } + const withMetadataOpts = { mode: 1, metadataHash: await metadataHash(context.polkadotJs()), diff --git a/test/suites/dev/moonbase/test-fees/__snapshots__/test-length-fees2.ts.snap b/test/suites/dev/moonbase/test-fees/__snapshots__/test-length-fees2.ts.snap new file mode 100644 index 00000000000..27b81f082cd --- /dev/null +++ b/test/suites/dev/moonbase/test-fees/__snapshots__/test-length-fees2.ts.snap @@ -0,0 +1,3 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`🗃️ D011607 Substrate Length Fees - Ethereum txn Interaction > 📁 D011607T01 should not charge length fee for precompile from Ethereum txn 1`] = `60752n`; diff --git a/test/suites/dev/moonbase/test-fees/test-length-fees2.ts b/test/suites/dev/moonbase/test-fees/test-length-fees2.ts index cb58d3dfb13..c471e05e1af 100644 --- a/test/suites/dev/moonbase/test-fees/test-length-fees2.ts +++ b/test/suites/dev/moonbase/test-fees/test-length-fees2.ts @@ -60,10 +60,12 @@ describeSuite({ const base_ethereum_fee = 21000n; const modexp_min_cost = 200n * 20n; // see MIN_GAS_COST in frontier's modexp precompile const entire_fee = non_zero_byte_fee + zero_byte_fee + base_ethereum_fee + modexp_min_cost; - // Given that the pov is refunded, the gas used should be the minimum of the legacy gas - // and the pov gas. - const expected = BigInt(Math.min(Number(entire_fee), 3797 * GAS_LIMIT_POV_RATIO)); + // the gas used should be the maximum of the legacy gas and the pov gas + const expected = BigInt(Math.max(Number(entire_fee), 3797 * GAS_LIMIT_POV_RATIO)); expect(receipt.gasUsed, "gasUsed does not match manual calculation").toBe(expected); + + // Snapshot gas usage + expect(receipt.gasUsed).toMatchSnapshot(); }, }); }, diff --git a/test/suites/dev/moonbase/test-gas/__snapshots__/test-gas-estimation-multiply.ts.snap b/test/suites/dev/moonbase/test-gas/__snapshots__/test-gas-estimation-multiply.ts.snap new file mode 100644 index 00000000000..878a483486d --- /dev/null +++ b/test/suites/dev/moonbase/test-gas/__snapshots__/test-gas-estimation-multiply.ts.snap @@ -0,0 +1,9 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`🗃️ D011804 Estimate Gas - Multiply > 📁 D011804T01 should return correct gas estimation 1`] = `22363n`; + +exports[`🗃️ D011804 Estimate Gas - Multiply > 📁 D011804T02 should work without gas limit 1`] = `22363n`; + +exports[`🗃️ D011804 Estimate Gas - Multiply > 📁 D011804T03 should work with gas limit 1`] = `22363n`; + +exports[`🗃️ D011804 Estimate Gas - Multiply > 📁 D011804T04 should ignore from balance (?) 1`] = `22363n`; diff --git a/test/suites/dev/moonbase/test-gas/test-gas-estimation-contracts.ts b/test/suites/dev/moonbase/test-gas/test-gas-estimation-contracts.ts index 8c7f10dc155..0cd9aba06e2 100644 --- a/test/suites/dev/moonbase/test-gas/test-gas-estimation-contracts.ts +++ b/test/suites/dev/moonbase/test-gas/test-gas-estimation-contracts.ts @@ -149,21 +149,23 @@ describeSuite({ it({ id: "T05", title: "Should be able to estimate gas of infinite loop call", - timeout: 240000, + timeout: 60000, test: async function () { const { contractAddress, abi } = await deployCreateCompiledContract(context, "Looper"); expect( async () => - await context.viem().estimateGas({ - account: ALITH_ADDRESS, - to: contractAddress, - data: encodeFunctionData({ - abi: abi, - functionName: "infinite", - args: [], - }), - }) + await customDevRpcRequest("eth_estimateGas", [ + { + from: ALITH_ADDRESS, + to: contractAddress, + data: encodeFunctionData({ + abi: abi, + functionName: "infinite", + args: [], + }), + }, + ]) ).rejects.toThrowError("gas required exceeds allowance 6000000"); }, }); diff --git a/test/suites/dev/moonbase/test-gas/test-gas-estimation-multiply.ts b/test/suites/dev/moonbase/test-gas/test-gas-estimation-multiply.ts index a867ea70e4e..356063543b1 100644 --- a/test/suites/dev/moonbase/test-gas/test-gas-estimation-multiply.ts +++ b/test/suites/dev/moonbase/test-gas/test-gas-estimation-multiply.ts @@ -32,7 +32,8 @@ describeSuite({ value: 0n, }); - expect(estimatedGas).to.equal(22363n); + // Snapshot estimated gas + expect(estimatedGas).toMatchSnapshot(); }, }); @@ -52,7 +53,8 @@ describeSuite({ value: 0n, }); - expect(estimatedGas).to.equal(22363n); + // Snapshot estimated gas + expect(estimatedGas).toMatchSnapshot(); }, }); @@ -71,7 +73,7 @@ describeSuite({ value: 0n, }); - expect(estimatedGas).to.equal(22363n); + expect(estimatedGas).toMatchSnapshot(); }, }); @@ -91,7 +93,8 @@ describeSuite({ value: 0n, }); - expect(estimatedGas).to.equal(22363n); + // Snapshot estimated gas + expect(estimatedGas).toMatchSnapshot(); }, }); diff --git a/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-assets-erc20d.ts.snap b/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-assets-erc20d.ts.snap new file mode 100644 index 00000000000..edd4bd43af0 --- /dev/null +++ b/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-assets-erc20d.ts.snap @@ -0,0 +1,3 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`🗃️ D012807 Precompiles - Assets-ERC20 Wasm > 📁 D012807T01 allows to approve transfer and use transferFrom from contract calls 1`] = `111252n`; diff --git a/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-dummy-bytecode.ts.snap b/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-dummy-bytecode.ts.snap new file mode 100644 index 00000000000..a3d0f933b72 --- /dev/null +++ b/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-dummy-bytecode.ts.snap @@ -0,0 +1,3 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`🗃️ D012838 Precompiles - precompiles dummy bytecode > 📁 D012838T02 should revert when dummy bytecode is called 1`] = `21006n`; diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-assets-erc20d.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-assets-erc20d.ts index 60eaffb2cd1..20ccb551403 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-assets-erc20d.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-assets-erc20d.ts @@ -127,10 +127,24 @@ describeSuite({ .query.assets.approvals(assetId.toU8a(), erc20InstanceAddress, BALTATHAR_ADDRESS); expect(newApprovals.unwrap().amount.toBigInt()).to.equal(1000n); + const estimatedGas = await context.viem().estimateGas({ + account: BALTATHAR_ADDRESS, + to: ADDRESS_ERC20, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: "transferFrom", + args: [erc20InstanceAddress, CHARLETH_ADDRESS, 1000], + }), + }); + + // Snapshot estimated gas + expect(estimatedGas).toMatchSnapshot(); + // this time we call directly from Baltathar the ERC20 contract const directBlock = await context.createBlock( createViemTransaction(context, { privateKey: BALTATHAR_PRIVATE_KEY, + gas: estimatedGas, to: ADDRESS_ERC20, data: encodeFunctionData({ functionName: "transferFrom", diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts index 40184ded181..d3d785f3fb3 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts @@ -99,8 +99,8 @@ describeSuite({ .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); expect(receipt.status).to.equal("reverted"); - // 31088 = call cost + 2*PUSH cost - expect(receipt.gasUsed).to.equal(31088n); + // gasUsed = call cost + 2*PUSH cost + expect(receipt.gasUsed).toMatchSnapshot(); }, }); }, diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts index e6209267f15..d65253c2c33 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts @@ -65,7 +65,7 @@ describeSuite({ id: "T03", title: "EIP example 1 - gas", test: async function () { - const expectedModExpGasCost = 9156n; + const expectedModExpGasCost = 1360n; const inputData = "0000000000000000000000000000000000000000000000000000000000000001" + // base length "0000000000000000000000000000000000000000000000000000000000000020" + // exponent length @@ -89,7 +89,6 @@ describeSuite({ .viem() .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); expect(receipt.status).toBe("success"); - const modExpGas = receipt.gasUsed - BigInt(numNonZeroBytes) * 16n - BigInt(numZeroBytes) * 4n - 21000n; expect(modExpGas, "ModExp gas pricing mismatch").to.equal(expectedModExpGasCost); @@ -126,7 +125,7 @@ describeSuite({ id: "T05", title: "EIP example 2 - gas", test: async function () { - const expectedModExpGasCost = 8656n; + const expectedModExpGasCost = 1360n; const inputData = "0000000000000000000000000000000000000000000000000000000000000000" + // base length "0000000000000000000000000000000000000000000000000000000000000020" + // exponent length @@ -159,7 +158,7 @@ describeSuite({ id: "T06", title: "nagydani-1-square - gas", test: async function () { - const expectedModExpGasCost = 7604n; + const expectedModExpGasCost = 200n; const inputData = "0000000000000000000000000000000000000000000000000000000000000040" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -194,7 +193,7 @@ describeSuite({ id: "T07", title: "nagydani-1-qube - gas", test: async function () { - const expectedModExpGasCost = 7604n; + const expectedModExpGasCost = 200n; const inputData = "0000000000000000000000000000000000000000000000000000000000000040" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -228,7 +227,7 @@ describeSuite({ id: "T08", title: "nagydani-1-pow0x10001 - gas", test: async function () { - const expectedModExpGasCost = 7584n; + const expectedModExpGasCost = 341n; const inputData = "0000000000000000000000000000000000000000000000000000000000000040" + // base length "0000000000000000000000000000000000000000000000000000000000000003" + // exponent length @@ -262,7 +261,7 @@ describeSuite({ id: "T09", title: "nagydani-2-square - gas", test: async function () { - const expectedModExpGasCost = 5592n; + const expectedModExpGasCost = 200n; const inputData = "0000000000000000000000000000000000000000000000000000000000000080" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -296,7 +295,7 @@ describeSuite({ id: "T10", title: "nagydani-2-qube - gas", test: async function () { - const expectedModExpGasCost = 5592n; + const expectedModExpGasCost = 200n; const inputData = "0000000000000000000000000000000000000000000000000000000000000080" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -330,7 +329,7 @@ describeSuite({ id: "T11", title: "nagydani-2-pow0x10001 - gas", test: async function () { - const expectedModExpGasCost = 5572n; + const expectedModExpGasCost = 1365n; const inputData = "0000000000000000000000000000000000000000000000000000000000000080" + // base length "0000000000000000000000000000000000000000000000000000000000000003" + // exponent length @@ -364,7 +363,7 @@ describeSuite({ id: "T12", title: "nagydani-3-square - gas", test: async function () { - const expectedModExpGasCost = 1472n; + const expectedModExpGasCost = 341n; const inputData = "0000000000000000000000000000000000000000000000000000000000000100" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -398,7 +397,7 @@ describeSuite({ id: "T13", title: "nagydani-3-qube - gas", test: async function () { - const expectedModExpGasCost = 1472n; + const expectedModExpGasCost = 341n; const inputData = "0000000000000000000000000000000000000000000000000000000000000100" + // base length "0000000000000000000000000000000000000000000000000000000000000001" + // exponent length @@ -744,4 +743,4 @@ describeSuite({ }, }); }, -}); +}); \ No newline at end of file diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts index 2accdc29205..fcd7754dea2 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts @@ -504,10 +504,7 @@ describeSuite({ // The tx can create an account, so record 148 bytes of storage growth // Storage growth ratio is 366 // storage_gas = 148 * 366 = 54168 - // pov_gas = 5693 * 16 = 91088 - // Given that the remaining pov_gas is now refunded, the effective gas is - // the storage_gas = 54168. - const expectedGas = 54_168n; + const expectedMinimumPovGas = 59000; const rawTxn = await context.writePrecompile!({ precompileName: "Proxy", functionName: "addProxy", @@ -543,7 +540,10 @@ describeSuite({ const { gasUsed } = await context .viem() .getTransactionReceipt({ hash: result2!.hash as `0x${string}` }); - expect(gasUsed).to.equal(expectedGas); + + // proof size reclaim seems indeterministic + expect(gasUsed).toBeGreaterThan(expectedMinimumPovGas); + expect(gasUsed).toBeLessThan(expectedMinimumPovGas + 2000); expect(await context.viem().getBalance({ address: randomAccount })).toBe(parseEther("5")); diff --git a/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.ts b/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.ts index 416821e3902..31ca88862b8 100644 --- a/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.ts +++ b/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.ts @@ -47,7 +47,7 @@ describeSuite({ args: [0], account: BALTATHAR_ADDRESS, }); - expect(estimatedGas).toMatchInlineSnapshot(`303092n`); + expect(estimatedGas).toMatchInlineSnapshot(`295530n`); const rawTxn = await context.writePrecompile!({ precompileName: "Randomness", @@ -64,7 +64,7 @@ describeSuite({ fulFillReceipt = await context .viem() .getTransactionReceipt({ hash: result![1].hash as `0x${string}` }); - expect(fulFillReceipt.gasUsed).toMatchInlineSnapshot(`153712n`); + expect(fulFillReceipt.gasUsed).toMatchInlineSnapshot(`158480n`); }); it({ @@ -175,11 +175,11 @@ describeSuite({ ).to.be.true; expect( (await context.polkadotJs().query.system.account(charleth.address)).data.free.toBigInt() > - DEFAULT_GENESIS_BALANCE + DEFAULT_GENESIS_BALANCE ).to.be.false; expect( (await context.polkadotJs().query.system.account(dorothy.address)).data.free.toBigInt() > - DEFAULT_GENESIS_BALANCE + DEFAULT_GENESIS_BALANCE ).to.be.true; }, }); diff --git a/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery3.ts b/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery3.ts index b516570b897..6fcb4efee27 100644 --- a/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery3.ts +++ b/test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery3.ts @@ -110,7 +110,7 @@ describeSuite({ account: BALTATHAR_ADDRESS, }); log("Estimated Gas for startLottery", estimatedGas); - expect(estimatedGas).toMatchInlineSnapshot(`303092n`); + expect(estimatedGas).toMatchInlineSnapshot(`298280n`); const rawTxn = await context.writePrecompile!({ precompileName: "Randomness", diff --git a/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery4.ts b/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery4.ts index 44511974c03..44fe11620a9 100644 --- a/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery4.ts +++ b/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery4.ts @@ -47,7 +47,7 @@ describeSuite({ args: [0], }); log("Estimated Gas for startLottery", estimatedGas); - expect(estimatedGas).toMatchInlineSnapshot(`285461n`); + expect(estimatedGas).toMatchInlineSnapshot(`284196n`); const rawTxn = await context.writePrecompile!({ precompileName: "Randomness", diff --git a/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery5.ts b/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery5.ts index e0af45d07a8..368480f16a4 100644 --- a/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery5.ts +++ b/test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery5.ts @@ -48,7 +48,7 @@ describeSuite({ args: [0], }); - expect(estimatedGas).toMatchInlineSnapshot(`285461n`); + expect(estimatedGas).toMatchInlineSnapshot(`284196n`); const rawTxn = await context.writePrecompile!({ precompileName: "Randomness", @@ -63,7 +63,7 @@ describeSuite({ .viem() .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); - expect(fulFillReceipt.gasUsed).toMatchInlineSnapshot(`159248n`); + expect(fulFillReceipt.gasUsed).toMatchInlineSnapshot(`164016n`); }); it({ id: "T01", diff --git a/test/suites/dev/moonbase/test-storage-growth/__snapshots__/test-precompile-storage-growth.ts.snap b/test/suites/dev/moonbase/test-storage-growth/__snapshots__/test-precompile-storage-growth.ts.snap new file mode 100644 index 00000000000..4eefabd4ea3 --- /dev/null +++ b/test/suites/dev/moonbase/test-storage-growth/__snapshots__/test-precompile-storage-growth.ts.snap @@ -0,0 +1,9 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`🗃️ D013504 Storage growth limit - Precompiles > 📁 D013504T01 should fail transfer due to insufficient gas required to cover the storage growth > Estimated gas for Proxy.addProxy call 1`] = `102539n`; + +exports[`🗃️ D013504 Storage growth limit - Precompiles > 📁 D013504T01 should fail transfer due to insufficient gas required to cover the storage growth > Estimated gas for Proxy.proxy call 1`] = `91908n`; + +exports[`🗃️ D013504 Storage growth limit - Precompiles > 📁 D013504T02 should transfer correctly with the required gas to cover the storage growth > Actual gas for (Proxy.proxy ERC20.transfer) call 1`] = `91908n`; + +exports[`🗃️ D013504 Storage growth limit - Precompiles > 📁 D013504T02 should transfer correctly with the required gas to cover the storage growth > Estimated gas for (Proxy.proxy ERC20.transfer) call 1`] = `91908n`; diff --git a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts index f8b5fa926f0..45583658380 100644 --- a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts +++ b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts @@ -6,6 +6,7 @@ import { FAITH_ADDRESS, FAITH_PRIVATE_KEY, PRECOMPILE_NATIVE_ERC20_ADDRESS, + PRECOMPILE_PROXY_ADDRESS, } from "@moonwall/util"; import { parseEther } from "ethers"; import { expectEVMResult } from "helpers/eth-transactions"; @@ -20,16 +21,26 @@ describeSuite({ // The tx can create an account, so record 148 bytes of storage growth // Storage growth ratio is 366 // storage_gas = 148 * 366 = 54168 - // pov_gas = 5693 * 16 = 91088 - // Given that the remaining pov_gas is now refunded, the effective gas is - // the storage_gas = 54168. - const expectedGas = 54_168n; it({ id: "T01", title: "should fail transfer due to insufficient gas required to cover the storage growth", test: async () => { const { abi: ierc20Abi } = fetchCompiledContract("IERC20"); + const { abi: proxyAbi } = fetchCompiledContract("Proxy"); + + const estimatedGas = await context.viem().estimateGas({ + account: FAITH_ADDRESS, + to: PRECOMPILE_PROXY_ADDRESS, + data: encodeFunctionData({ + abi: proxyAbi, + functionName: "addProxy", + args: [BALTATHAR_ADDRESS, CONTRACT_PROXY_TYPE_ANY, 0], + }), + }); + + // Snapshot estimated gas + expect(estimatedGas).toMatchSnapshot("Estimated gas for Proxy.addProxy call"); const rawTxn = await context.writePrecompile!({ precompileName: "Proxy", @@ -37,11 +48,32 @@ describeSuite({ args: [BALTATHAR_ADDRESS, CONTRACT_PROXY_TYPE_ANY, 0], privateKey: FAITH_PRIVATE_KEY, rawTxOnly: true, - gas: 1_000_000n, + gas: estimatedGas, }); const { result } = await context.createBlock(rawTxn); expectEVMResult(result!.events, "Succeed"); + const proxyProxyEstimatedGas = await context.viem().estimateGas({ + account: BALTATHAR_ADDRESS, + to: PRECOMPILE_PROXY_ADDRESS, + data: encodeFunctionData({ + abi: proxyAbi, + functionName: "proxy", + args: [ + FAITH_ADDRESS, + PRECOMPILE_NATIVE_ERC20_ADDRESS, + encodeFunctionData({ + abi: ierc20Abi, + functionName: "transfer", + args: [newAccount, parseEther("5")], + }), + ], + }), + }); + + // Snapshot estimated gas + expect(proxyProxyEstimatedGas).toMatchSnapshot("Estimated gas for Proxy.proxy call"); + const balBefore = await context.viem().getBalance({ address: FAITH_ADDRESS }); const rawTxn2 = await context.writePrecompile!({ precompileName: "Proxy", @@ -75,6 +107,28 @@ describeSuite({ test: async () => { const balBefore = await context.viem().getBalance({ address: FAITH_ADDRESS }); const { abi: ierc20Abi } = fetchCompiledContract("IERC20"); + const { abi: proxyAbi } = fetchCompiledContract("Proxy"); + + const estimatedGas = await context.viem().estimateGas({ + account: BALTATHAR_ADDRESS, + to: PRECOMPILE_PROXY_ADDRESS, + data: encodeFunctionData({ + abi: proxyAbi, + functionName: "proxy", + args: [ + FAITH_ADDRESS, + PRECOMPILE_NATIVE_ERC20_ADDRESS, + encodeFunctionData({ + abi: ierc20Abi, + functionName: "transfer", + args: [newAccount, parseEther("5")], + }), + ], + }), + }); + + // Snapshot estimated gas + expect(estimatedGas).toMatchSnapshot("Estimated gas for (Proxy.proxy ERC20.transfer) call"); const rawTxn2 = await context.writePrecompile!({ precompileName: "Proxy", @@ -90,7 +144,7 @@ describeSuite({ ], privateKey: BALTATHAR_PRIVATE_KEY, rawTxOnly: true, - gas: 91_088n, + gas: estimatedGas, }); const { result } = await context.createBlock(rawTxn2); @@ -100,7 +154,8 @@ describeSuite({ const { gasUsed } = await context .viem() .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); - expect(gasUsed).to.equal(expectedGas); + // Snapshot actual gas + expect(estimatedGas).toMatchSnapshot("Actual gas for (Proxy.proxy ERC20.transfer) call"); const balAfter = await context.viem().getBalance({ address: FAITH_ADDRESS }); expect(balBefore - balAfter).to.equal(parseEther("5")); From db0a1e18f28f7f6c15c311160ecd9f9cff5bf33e Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 27 Nov 2024 11:13:21 +0000 Subject: [PATCH 08/11] update pin --- Cargo.lock | 385 ++++++++++++++++++++--------------------------------- Cargo.toml | 50 +++---- 2 files changed, 169 insertions(+), 266 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2921119deec..bd0406bf2b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3088,7 +3088,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "async-trait", "fp-storage", @@ -3100,7 +3100,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "async-trait", "fp-consensus", @@ -3116,7 +3116,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "async-trait", "ethereum", @@ -3146,7 +3146,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "fc-db", "fc-storage", @@ -3169,7 +3169,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "ethereum", "ethereum-types", @@ -3178,7 +3178,7 @@ dependencies = [ "fc-mapping-sync", "fc-rpc-core", "fc-storage", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "fp-rpc", "fp-storage", "futures 0.3.30", @@ -3186,7 +3186,7 @@ dependencies = [ "jsonrpsee", "libsecp256k1", "log", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "parity-scale-codec", "prometheus", "rand 0.8.5", @@ -3224,7 +3224,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "ethereum", "ethereum-types", @@ -3239,7 +3239,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "ethereum", "ethereum-types", @@ -3429,26 +3429,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" -dependencies = [ - "hex", - "impl-serde", - "libsecp256k1", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "staging-xcm", -] - -[[package]] -name = "fp-account" -version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "hex", "impl-serde", @@ -3467,7 +3448,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "ethereum", "parity-scale-codec", @@ -3478,35 +3459,19 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "ethereum", "ethereum-types", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", - "frame-support", - "parity-scale-codec", -] - -[[package]] -name = "fp-evm" -version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" -dependencies = [ - "environmental", - "evm", + "fp-evm", "frame-support", - "num_enum 0.7.3", "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-runtime", ] [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "environmental", "evm", @@ -3522,11 +3487,11 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "ethereum", "ethereum-types", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "parity-scale-codec", "scale-info", "sp-api", @@ -3538,7 +3503,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "frame-support", "parity-scale-codec", @@ -3550,7 +3515,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "parity-scale-codec", "serde", @@ -6246,7 +6211,7 @@ dependencies = [ "cumulus-test-relay-sproof-builder", "ethereum", "evm-tracing-events", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -6284,7 +6249,7 @@ dependencies = [ "pallet-erc20-xcm-bridge", "pallet-ethereum", "pallet-ethereum-xcm", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-evm-chain-id", "pallet-evm-precompile-author-mapping", "pallet-evm-precompile-balances-erc20", @@ -6354,7 +6319,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "precompile-foreign-asset-migrator", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rlp", "scale-info", "serde", @@ -6509,9 +6474,9 @@ dependencies = [ "evm-gasometer", "evm-runtime", "evm-tracing-events", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "moonbeam-primitives-ext", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "parity-scale-codec", "sp-core", "sp-io", @@ -6761,7 +6726,7 @@ dependencies = [ "cumulus-test-relay-sproof-builder", "ethereum", "evm-tracing-events", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -6799,7 +6764,7 @@ dependencies = [ "pallet-erc20-xcm-bridge", "pallet-ethereum", "pallet-ethereum-xcm", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-evm-chain-id", "pallet-evm-precompile-author-mapping", "pallet-evm-precompile-balances-erc20", @@ -6866,7 +6831,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rlp", "scale-info", "serde", @@ -6910,7 +6875,7 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "cumulus-primitives-storage-weight-reclaim", "fp-ethereum", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-benchmarking", "frame-support", "frame-system", @@ -6932,7 +6897,7 @@ dependencies = [ "pallet-conviction-voting", "pallet-crowdloan-rewards", "pallet-ethereum-xcm", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-evm-chain-id", "pallet-identity", "pallet-message-queue", @@ -6960,7 +6925,7 @@ dependencies = [ "pallet-xcm-transactor", "pallet-xcm-weight-trader", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "sp-api", "sp-consensus-slots", @@ -7191,7 +7156,7 @@ dependencies = [ "cumulus-test-relay-sproof-builder", "ethereum", "evm-tracing-events", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -7229,7 +7194,7 @@ dependencies = [ "pallet-erc20-xcm-bridge", "pallet-ethereum", "pallet-ethereum-xcm", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-evm-chain-id", "pallet-evm-precompile-author-mapping", "pallet-evm-precompile-balances-erc20", @@ -7296,7 +7261,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rlp", "scale-info", "serde", @@ -8600,12 +8565,12 @@ version = "1.0.0" dependencies = [ "environmental", "ethereum-types", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "log", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "parity-scale-codec", "scale-info", @@ -8621,7 +8586,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "environmental", "ethereum", @@ -8629,12 +8594,12 @@ dependencies = [ "evm", "fp-consensus", "fp-ethereum", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "fp-rpc", "fp-storage", "frame-support", "frame-system", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "parity-scale-codec", "scale-info", "sp-io", @@ -8649,7 +8614,7 @@ dependencies = [ "ethereum", "ethereum-types", "fp-ethereum", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -8659,7 +8624,7 @@ dependencies = [ "libsecp256k1", "pallet-balances", "pallet-ethereum", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-evm-precompile-proxy", "pallet-proxy", "pallet-timestamp", @@ -8677,37 +8642,13 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "cumulus-primitives-storage-weight-reclaim", "environmental", "evm", - "fp-account 1.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", - "frame-benchmarking", - "frame-support", - "frame-system", - "hash-db", - "hex-literal 0.4.1", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", -] - -[[package]] -name = "pallet-evm" -version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" -dependencies = [ - "cumulus-primitives-storage-weight-reclaim", - "environmental", - "evm", - "fp-account 1.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-account", + "fp-evm", "frame-benchmarking", "frame-support", "frame-system", @@ -8725,7 +8666,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "frame-support", "frame-system", @@ -8738,7 +8679,7 @@ name = "pallet-evm-precompile-author-mapping" version = "0.2.0" dependencies = [ "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8747,11 +8688,11 @@ dependencies = [ "num_enum 0.5.11", "pallet-author-mapping", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sp-core", @@ -8766,7 +8707,7 @@ version = "0.1.0" dependencies = [ "account", "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8774,11 +8715,11 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sha3", @@ -8795,18 +8736,18 @@ version = "0.1.0" dependencies = [ "derive_more", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sha3", @@ -8820,17 +8761,17 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", ] [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "sp-core", "substrate-bn", ] @@ -8841,7 +8782,7 @@ version = "0.1.0" dependencies = [ "derive_more", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8849,11 +8790,11 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sha3", @@ -8871,7 +8812,7 @@ dependencies = [ "account", "derive_more", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8879,12 +8820,12 @@ dependencies = [ "num_enum 0.5.11", "pallet-balances", "pallet-collective", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "pallet-treasury", "parity-scale-codec", "paste", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sha3", @@ -8903,7 +8844,7 @@ version = "0.1.0" dependencies = [ "account", "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -8911,10 +8852,10 @@ dependencies = [ "num_enum 0.5.11", "pallet-balances", "pallet-conviction-voting", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rustc-hex", "scale-info", "serde", @@ -8934,19 +8875,19 @@ dependencies = [ "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "log", "num_enum 0.5.11", "pallet-balances", "pallet-crowdloan-rewards", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-message-queue", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rustc-hex", "scale-info", "serde", @@ -8960,11 +8901,11 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "parity-scale-codec", "sp-runtime", ] @@ -8977,7 +8918,7 @@ dependencies = [ "cumulus-primitives-core", "derive_more", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex", @@ -8985,13 +8926,13 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "pallet-xcm", "pallet-xcm-transactor", "parity-scale-codec", "paste", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sha3", @@ -9012,18 +8953,18 @@ version = "0.1.0" dependencies = [ "enumflags2", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex", "hex-literal 0.4.1", "log", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-identity", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sha3", @@ -9036,9 +8977,9 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "num", ] @@ -9046,11 +8987,11 @@ dependencies = [ name = "pallet-evm-precompile-p256verify" version = "0.1.0" dependencies = [ - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "hex-literal 0.4.1", "p256", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", ] [[package]] @@ -9058,17 +8999,17 @@ name = "pallet-evm-precompile-parachain-staking" version = "1.0.0" dependencies = [ "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-parachain-staking", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rustc-hex", "scale-info", "serde", @@ -9085,18 +9026,18 @@ name = "pallet-evm-precompile-preimage" version = "0.1.0" dependencies = [ "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-preimage", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rustc-hex", "scale-info", "serde", @@ -9114,18 +9055,18 @@ dependencies = [ "account", "derive_more", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-proxy", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rustc-hex", "scale-info", "serde", @@ -9141,7 +9082,7 @@ name = "pallet-evm-precompile-randomness" version = "0.1.0" dependencies = [ "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -9150,12 +9091,12 @@ dependencies = [ "num_enum 0.5.11", "pallet-author-mapping", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-randomness", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "session-keys-primitives", "sp-core", @@ -9169,20 +9110,20 @@ name = "pallet-evm-precompile-referenda" version = "0.1.0" dependencies = [ "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-preimage", "pallet-referenda", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rustc-hex", "scale-info", "serde", @@ -9198,17 +9139,17 @@ name = "pallet-evm-precompile-registry" version = "0.1.0" dependencies = [ "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sp-core", @@ -9224,20 +9165,20 @@ dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-message-queue", "pallet-staking", "pallet-timestamp", "pallet-xcm-transactor", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rustc-hex", "scale-info", "serde", @@ -9258,18 +9199,18 @@ version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex", "moonbeam-runtime-common", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-precompile-benchmarks", "pallet-relay-storage-roots", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "sp-core", "sp-io", @@ -9281,18 +9222,18 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "tiny-keccak", ] [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "ripemd", "sp-io", ] @@ -9300,14 +9241,14 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-storage-cleaner" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "sp-core", "sp-runtime", ] @@ -9319,15 +9260,15 @@ source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot- dependencies = [ "cumulus-primitives-core", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", + "fp-evm", "frame-support", "frame-system", "log", "num_enum 0.7.3", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", + "pallet-evm", "pallet-xcm", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", + "precompile-utils", "scale-info", "sp-core", "sp-runtime", @@ -9345,18 +9286,18 @@ dependencies = [ "cumulus-primitives-core", "derive_more", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "pallet-xcm", "pallet-xcm-transactor", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rustc-hex", "scale-info", "serde", @@ -9378,17 +9319,17 @@ version = "0.1.0" dependencies = [ "cumulus-primitives-core", "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "pallet-xcm", "parity-scale-codec", "polkadot-parachain-primitives", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sha3", @@ -9410,18 +9351,18 @@ dependencies = [ "account", "cumulus-primitives-core", "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "log", "num_enum 0.5.11", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "pallet-xcm", "pallet-xcm-transactor", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "rustc-hex", "scale-info", "serde", @@ -9443,7 +9384,7 @@ version = "0.1.0" dependencies = [ "account", "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -9452,11 +9393,11 @@ dependencies = [ "num_enum 0.5.11", "pallet-assets", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sha3", @@ -9652,18 +9593,18 @@ name = "pallet-moonbeam-foreign-assets" version = "0.1.0" dependencies = [ "ethereum-types", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-benchmarking", "frame-support", "frame-system", "hex", "log", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-timestamp", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", - "precompile-utils-macro 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", + "precompile-utils-macro", "scale-info", "sp-core", "sp-io", @@ -9684,7 +9625,7 @@ dependencies = [ "log", "pallet-assets", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", @@ -9877,14 +9818,14 @@ version = "0.1.0" dependencies = [ "cumulus-primitives-core", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-benchmarking", "frame-support", "frame-system", "pallet-evm-precompile-p256verify", "pallet-relay-storage-roots", "parity-scale-codec", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "sp-core", "sp-std", @@ -12008,7 +11949,7 @@ version = "0.1.0" dependencies = [ "account", "derive_more", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex-literal 0.4.1", @@ -12018,12 +11959,12 @@ dependencies = [ "pallet-asset-manager", "pallet-assets", "pallet-balances", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "pallet-moonbeam-foreign-assets", "pallet-timestamp", "parity-scale-codec", "paste", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "scale-info", "serde", "sha3", @@ -12038,36 +11979,12 @@ dependencies = [ [[package]] name = "precompile-utils" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" -dependencies = [ - "environmental", - "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", - "frame-support", - "frame-system", - "hex", - "impl-trait-for-tuples", - "log", - "num_enum 0.7.3", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", - "parity-scale-codec", - "precompile-utils-macro 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407)", - "sp-core", - "sp-io", - "sp-runtime", - "sp-weights", - "staging-xcm", -] - -[[package]] -name = "precompile-utils" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "derive_more", "environmental", "evm", - "fp-evm 3.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "fp-evm", "frame-support", "frame-system", "hex", @@ -12075,9 +11992,9 @@ dependencies = [ "impl-trait-for-tuples", "log", "num_enum 0.7.3", - "pallet-evm 6.0.0-dev (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "pallet-evm", "parity-scale-codec", - "precompile-utils-macro 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils-macro", "scale-info", "serde", "similar-asserts", @@ -12091,21 +12008,7 @@ dependencies = [ [[package]] name = "precompile-utils-macro" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#4b579efb1fe54c69f2ac8181eb7e8956677b4272" -dependencies = [ - "case", - "num_enum 0.7.3", - "prettyplease 0.2.22", - "proc-macro2", - "quote", - "sp-crypto-hashing", - "syn 1.0.109", -] - -[[package]] -name = "precompile-utils-macro" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim#9de3e0110d47e8a1d2db2b548f279c5bdcf32538" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-stable2407#56349814c1e029d99a9c433cc229e81d32cb0aff" dependencies = [ "case", "num_enum 0.7.3", @@ -16682,7 +16585,7 @@ dependencies = [ "moonbase-runtime", "moonbeam-runtime", "moonriver-runtime", - "precompile-utils 0.1.0 (git+https://github.com/moonbeam-foundation/frontier?branch=rq/fix-pov-reclaim)", + "precompile-utils", "serde_json", ] diff --git a/Cargo.toml b/Cargo.toml index d7a1189d624..9ff6678e5bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -246,41 +246,41 @@ ethereum-types = { version = "0.14", default-features = false } evm = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } evm-gasometer = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } evm-runtime = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-stable2407", default-features = false } -fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false, features = [ +fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false, features = [ "forbid-evm-reentrancy", ] } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false, features = [ +pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false, features = [ "forbid-evm-reentrancy", ] } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -pallet-evm-precompile-storage-cleaner = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +pallet-evm-precompile-storage-cleaner = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } -precompile-utils = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } -precompile-utils-macro = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", default-features = false } +precompile-utils = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } +precompile-utils-macro = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", default-features = false } # Frontier (client) -fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } -fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } -fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } -fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } -fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim", features = [ +fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407", features = [ "rpc-binary-search-estimate", ] } -fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } -fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } -fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } -fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "rq/fix-pov-reclaim" } +fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } +fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-stable2407" } # Cumulus (wasm) From 7ad27d1af32226f66523e5ae3266377efd56c12a Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 27 Nov 2024 11:40:03 +0000 Subject: [PATCH 09/11] updated moonwall config and revert some test changes --- test/moonwall.config.json | 10 +++++----- .../test-transaction-with-metadata-hash.ts | 19 ++----------------- .../test-precompile-dummy-bytecode.ts.snap | 3 --- .../test-precompile-dummy-bytecode.ts | 4 ++-- .../test-precompile/test-precompile-modexp.ts | 2 +- 5 files changed, 10 insertions(+), 28 deletions(-) delete mode 100644 test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-dummy-bytecode.ts.snap diff --git a/test/moonwall.config.json b/test/moonwall.config.json index fbd15e67f91..7e5b42bebd7 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -346,7 +346,7 @@ { "name": "lazy_loading_moonbeam", "testFileDir": ["suites/lazy-loading"], - "include": ["**/*test*"], + "include": ["**/*test*.ts"], "timeout": 180000, "contracts": "contracts/", "runScripts": [ @@ -392,7 +392,7 @@ { "name": "dev_moonbeam", "testFileDir": ["suites/dev/moonbeam", "suites/dev/common"], - "include": ["**/*test*"], + "include": ["**/*test*.ts"], "timeout": 180000, "contracts": "contracts/", "runScripts": [ @@ -435,7 +435,7 @@ { "name": "dev_moonriver", "testFileDir": ["suites/dev/common"], - "include": ["**/*test*"], + "include": ["**/*test*.ts"], "timeout": 180000, "contracts": "contracts/", "runScripts": [ @@ -478,7 +478,7 @@ { "name": "dev_moonbase", "testFileDir": ["suites/dev/moonbase", "suites/dev/common"], - "include": ["**/*test*"], + "include": ["**/*test*.ts"], "timeout": 180000, "contracts": "contracts/", "runScripts": [ @@ -521,7 +521,7 @@ { "name": "dev_moonbase_tracing", "testFileDir": ["suites/tracing-tests"], - "include": ["**/*test*"], + "include": ["**/*test*.ts"], "contracts": "contracts/", "runScripts": [ "compile-contracts.ts compile", diff --git a/test/suites/dev/common/test-transaction/test-transaction-with-metadata-hash.ts b/test/suites/dev/common/test-transaction/test-transaction-with-metadata-hash.ts index dab9f57be39..b1f71d34751 100644 --- a/test/suites/dev/common/test-transaction/test-transaction-with-metadata-hash.ts +++ b/test/suites/dev/common/test-transaction/test-transaction-with-metadata-hash.ts @@ -20,13 +20,6 @@ async function metadataHash(api: ApiPromise) { return u8aToHex(merkleizedMetadata.digest()); } -async function isMetadataHashEnabled(api: ApiPromise) { - const metadata = await api.rpc.state.getMetadata(); - return metadata.asLatest.extrinsic.signedExtensions.some( - (ext) => ext.identifier.toString() === "CheckMetadataHash" - ); -} - describeSuite({ id: "D010501", title: "Test transaction with metadata hash", @@ -35,11 +28,7 @@ describeSuite({ it({ id: "T01", title: "Should fail with an invalid metadata hash", - test: async function (ctx) { - if (!(await isMetadataHashEnabled(context.polkadotJs()))) { - ctx.skip(); - } - + test: async function () { const withMetadataOpts: Partial = { mode: 1, metadataHash: "0x" + "00".repeat(32), @@ -59,11 +48,7 @@ describeSuite({ it({ id: "T02", title: "Should succeed with a valid metadata hash", - test: async function (ctx) { - if (!(await isMetadataHashEnabled(context.polkadotJs()))) { - ctx.skip(); - } - + test: async function () { const withMetadataOpts = { mode: 1, metadataHash: await metadataHash(context.polkadotJs()), diff --git a/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-dummy-bytecode.ts.snap b/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-dummy-bytecode.ts.snap deleted file mode 100644 index a3d0f933b72..00000000000 --- a/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-dummy-bytecode.ts.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`🗃️ D012838 Precompiles - precompiles dummy bytecode > 📁 D012838T02 should revert when dummy bytecode is called 1`] = `21006n`; diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts index d3d785f3fb3..b3726b6ed4c 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts @@ -99,8 +99,8 @@ describeSuite({ .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); expect(receipt.status).to.equal("reverted"); - // gasUsed = call cost + 2*PUSH cost - expect(receipt.gasUsed).toMatchSnapshot(); + // 21006 = call cost + 2*PUSH cost + expect(receipt.gasUsed).to.equal(21006n); }, }); }, diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts index d65253c2c33..a6e89913b93 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts @@ -743,4 +743,4 @@ describeSuite({ }, }); }, -}); \ No newline at end of file +}); From b80cf94427c1601c523323989f40f25991c50e55 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 27 Nov 2024 13:56:09 +0000 Subject: [PATCH 10/11] apply review suggestions and remove snapshot files --- .../__snapshots__/test-length-fees2.ts.snap | 3 --- .../moonbase/test-fees/test-length-fees2.ts | 3 --- .../test-gas-estimation-multiply.ts.snap | 9 --------- .../test-gas/test-gas-estimation-multiply.ts | 8 ++++---- .../test-precompile-assets-erc20d.ts.snap | 3 --- .../test-precompile-assets-erc20d.ts | 2 +- .../test-precompile/test-precompile-proxy.ts | 9 +++------ .../test-precompile-storage-growth.ts.snap | 9 --------- .../test-precompile-storage-growth.ts | 19 ++++++++++--------- 9 files changed, 18 insertions(+), 47 deletions(-) delete mode 100644 test/suites/dev/moonbase/test-fees/__snapshots__/test-length-fees2.ts.snap delete mode 100644 test/suites/dev/moonbase/test-gas/__snapshots__/test-gas-estimation-multiply.ts.snap delete mode 100644 test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-assets-erc20d.ts.snap delete mode 100644 test/suites/dev/moonbase/test-storage-growth/__snapshots__/test-precompile-storage-growth.ts.snap diff --git a/test/suites/dev/moonbase/test-fees/__snapshots__/test-length-fees2.ts.snap b/test/suites/dev/moonbase/test-fees/__snapshots__/test-length-fees2.ts.snap deleted file mode 100644 index 27b81f082cd..00000000000 --- a/test/suites/dev/moonbase/test-fees/__snapshots__/test-length-fees2.ts.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`🗃️ D011607 Substrate Length Fees - Ethereum txn Interaction > 📁 D011607T01 should not charge length fee for precompile from Ethereum txn 1`] = `60752n`; diff --git a/test/suites/dev/moonbase/test-fees/test-length-fees2.ts b/test/suites/dev/moonbase/test-fees/test-length-fees2.ts index c471e05e1af..010710b13e2 100644 --- a/test/suites/dev/moonbase/test-fees/test-length-fees2.ts +++ b/test/suites/dev/moonbase/test-fees/test-length-fees2.ts @@ -63,9 +63,6 @@ describeSuite({ // the gas used should be the maximum of the legacy gas and the pov gas const expected = BigInt(Math.max(Number(entire_fee), 3797 * GAS_LIMIT_POV_RATIO)); expect(receipt.gasUsed, "gasUsed does not match manual calculation").toBe(expected); - - // Snapshot gas usage - expect(receipt.gasUsed).toMatchSnapshot(); }, }); }, diff --git a/test/suites/dev/moonbase/test-gas/__snapshots__/test-gas-estimation-multiply.ts.snap b/test/suites/dev/moonbase/test-gas/__snapshots__/test-gas-estimation-multiply.ts.snap deleted file mode 100644 index 878a483486d..00000000000 --- a/test/suites/dev/moonbase/test-gas/__snapshots__/test-gas-estimation-multiply.ts.snap +++ /dev/null @@ -1,9 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`🗃️ D011804 Estimate Gas - Multiply > 📁 D011804T01 should return correct gas estimation 1`] = `22363n`; - -exports[`🗃️ D011804 Estimate Gas - Multiply > 📁 D011804T02 should work without gas limit 1`] = `22363n`; - -exports[`🗃️ D011804 Estimate Gas - Multiply > 📁 D011804T03 should work with gas limit 1`] = `22363n`; - -exports[`🗃️ D011804 Estimate Gas - Multiply > 📁 D011804T04 should ignore from balance (?) 1`] = `22363n`; diff --git a/test/suites/dev/moonbase/test-gas/test-gas-estimation-multiply.ts b/test/suites/dev/moonbase/test-gas/test-gas-estimation-multiply.ts index 356063543b1..15b2ef79d9f 100644 --- a/test/suites/dev/moonbase/test-gas/test-gas-estimation-multiply.ts +++ b/test/suites/dev/moonbase/test-gas/test-gas-estimation-multiply.ts @@ -33,7 +33,7 @@ describeSuite({ }); // Snapshot estimated gas - expect(estimatedGas).toMatchSnapshot(); + expect(estimatedGas).toMatchInlineSnapshot(`22363n`); }, }); @@ -54,7 +54,7 @@ describeSuite({ }); // Snapshot estimated gas - expect(estimatedGas).toMatchSnapshot(); + expect(estimatedGas).toMatchInlineSnapshot(`22363n`); }, }); @@ -73,7 +73,7 @@ describeSuite({ value: 0n, }); - expect(estimatedGas).toMatchSnapshot(); + expect(estimatedGas).toMatchInlineSnapshot(`22363n`); }, }); @@ -94,7 +94,7 @@ describeSuite({ }); // Snapshot estimated gas - expect(estimatedGas).toMatchSnapshot(); + expect(estimatedGas).toMatchInlineSnapshot(`22363n`); }, }); diff --git a/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-assets-erc20d.ts.snap b/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-assets-erc20d.ts.snap deleted file mode 100644 index edd4bd43af0..00000000000 --- a/test/suites/dev/moonbase/test-precompile/__snapshots__/test-precompile-assets-erc20d.ts.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`🗃️ D012807 Precompiles - Assets-ERC20 Wasm > 📁 D012807T01 allows to approve transfer and use transferFrom from contract calls 1`] = `111252n`; diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-assets-erc20d.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-assets-erc20d.ts index 20ccb551403..be123caad7c 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-assets-erc20d.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-assets-erc20d.ts @@ -138,7 +138,7 @@ describeSuite({ }); // Snapshot estimated gas - expect(estimatedGas).toMatchSnapshot(); + expect(estimatedGas).toMatchInlineSnapshot(`111252n`); // this time we call directly from Baltathar the ERC20 contract const directBlock = await context.createBlock( diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts index fcd7754dea2..e351439eba5 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts @@ -501,10 +501,7 @@ describeSuite({ // The account cannot be random otherwise the calldata might contain more // zero bytes and have a different gas cost const randomAccount = "0x1ced798a66b803d0dbb665680283980a939a6432"; - // The tx can create an account, so record 148 bytes of storage growth - // Storage growth ratio is 366 - // storage_gas = 148 * 366 = 54168 - const expectedMinimumPovGas = 59000; + const rawTxn = await context.writePrecompile!({ precompileName: "Proxy", functionName: "addProxy", @@ -540,10 +537,10 @@ describeSuite({ const { gasUsed } = await context .viem() .getTransactionReceipt({ hash: result2!.hash as `0x${string}` }); - + const expectedMinimumPovGas = 59000n; // proof size reclaim seems indeterministic expect(gasUsed).toBeGreaterThan(expectedMinimumPovGas); - expect(gasUsed).toBeLessThan(expectedMinimumPovGas + 2000); + expect(gasUsed).toBeLessThan(expectedMinimumPovGas + 2000n); expect(await context.viem().getBalance({ address: randomAccount })).toBe(parseEther("5")); diff --git a/test/suites/dev/moonbase/test-storage-growth/__snapshots__/test-precompile-storage-growth.ts.snap b/test/suites/dev/moonbase/test-storage-growth/__snapshots__/test-precompile-storage-growth.ts.snap deleted file mode 100644 index 4eefabd4ea3..00000000000 --- a/test/suites/dev/moonbase/test-storage-growth/__snapshots__/test-precompile-storage-growth.ts.snap +++ /dev/null @@ -1,9 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`🗃️ D013504 Storage growth limit - Precompiles > 📁 D013504T01 should fail transfer due to insufficient gas required to cover the storage growth > Estimated gas for Proxy.addProxy call 1`] = `102539n`; - -exports[`🗃️ D013504 Storage growth limit - Precompiles > 📁 D013504T01 should fail transfer due to insufficient gas required to cover the storage growth > Estimated gas for Proxy.proxy call 1`] = `91908n`; - -exports[`🗃️ D013504 Storage growth limit - Precompiles > 📁 D013504T02 should transfer correctly with the required gas to cover the storage growth > Actual gas for (Proxy.proxy ERC20.transfer) call 1`] = `91908n`; - -exports[`🗃️ D013504 Storage growth limit - Precompiles > 📁 D013504T02 should transfer correctly with the required gas to cover the storage growth > Estimated gas for (Proxy.proxy ERC20.transfer) call 1`] = `91908n`; diff --git a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts index 45583658380..5bc7325d9e6 100644 --- a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts +++ b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts @@ -18,9 +18,6 @@ describeSuite({ foundationMethods: "dev", testCases: ({ context, it, log }) => { const newAccount = "0x1ced798a66b803d0dbb665680283980a939a6432"; - // The tx can create an account, so record 148 bytes of storage growth - // Storage growth ratio is 366 - // storage_gas = 148 * 366 = 54168 it({ id: "T01", @@ -40,7 +37,7 @@ describeSuite({ }); // Snapshot estimated gas - expect(estimatedGas).toMatchSnapshot("Estimated gas for Proxy.addProxy call"); + expect(estimatedGas).toMatchInlineSnapshot(`102539n`); const rawTxn = await context.writePrecompile!({ precompileName: "Proxy", @@ -72,7 +69,7 @@ describeSuite({ }); // Snapshot estimated gas - expect(proxyProxyEstimatedGas).toMatchSnapshot("Estimated gas for Proxy.proxy call"); + expect(proxyProxyEstimatedGas).toMatchInlineSnapshot(`91908n`); const balBefore = await context.viem().getBalance({ address: FAITH_ADDRESS }); const rawTxn2 = await context.writePrecompile!({ @@ -89,7 +86,7 @@ describeSuite({ ], privateKey: BALTATHAR_PRIVATE_KEY, rawTxOnly: true, - gas: 40_000n, + gas: proxyProxyEstimatedGas - 10_000n, }); const { result: result2 } = await context.createBlock(rawTxn2); @@ -128,7 +125,7 @@ describeSuite({ }); // Snapshot estimated gas - expect(estimatedGas).toMatchSnapshot("Estimated gas for (Proxy.proxy ERC20.transfer) call"); + expect(estimatedGas).toMatchInlineSnapshot(`91908n`); const rawTxn2 = await context.writePrecompile!({ precompileName: "Proxy", @@ -154,8 +151,12 @@ describeSuite({ const { gasUsed } = await context .viem() .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); - // Snapshot actual gas - expect(estimatedGas).toMatchSnapshot("Actual gas for (Proxy.proxy ERC20.transfer) call"); + + // The tx can create an account, so record 148 bytes of storage growth + // Storage growth ratio is 366 + // storage_gas = 148 * 366 = 54168 + // pov_gas = proof_size * GAS_LIMIT_POV_RATIO + expect(gasUsed).toMatchInlineSnapshot(`60768n`); const balAfter = await context.viem().getBalance({ address: FAITH_ADDRESS }); expect(balBefore - balAfter).to.equal(parseEther("5")); From 33470512490e7e3a9aa594e56fee5bd46f85bd46 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 27 Nov 2024 14:14:45 +0000 Subject: [PATCH 11/11] fix test --- .../dev/moonbase/test-precompile/test-precompile-proxy.ts | 1 + .../test-storage-growth/test-precompile-storage-growth.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts index e351439eba5..f89090e47f1 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts @@ -538,6 +538,7 @@ describeSuite({ .viem() .getTransactionReceipt({ hash: result2!.hash as `0x${string}` }); const expectedMinimumPovGas = 59000n; + // pov_gas = proof_size * GAS_LIMIT_POV_RATIO // proof size reclaim seems indeterministic expect(gasUsed).toBeGreaterThan(expectedMinimumPovGas); expect(gasUsed).toBeLessThan(expectedMinimumPovGas + 2000n); diff --git a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts index 5bc7325d9e6..b3cd42b7cff 100644 --- a/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts +++ b/test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts @@ -156,7 +156,7 @@ describeSuite({ // Storage growth ratio is 366 // storage_gas = 148 * 366 = 54168 // pov_gas = proof_size * GAS_LIMIT_POV_RATIO - expect(gasUsed).toMatchInlineSnapshot(`60768n`); + expect(gasUsed).toMatchInlineSnapshot(`58336n`); const balAfter = await context.viem().getBalance({ address: FAITH_ADDRESS }); expect(balBefore - balAfter).to.equal(parseEther("5"));