Skip to content

Commit fb5af73

Browse files
authored
remove pallet-precompile-benchmarks instance from on-chain runtime (#3365)
1 parent 2afb0c8 commit fb5af73

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

precompiles/relay-data-verifier/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,7 @@ pub struct RelayDataVerifierPrecompile<Runtime, WeightInfo>(PhantomData<(Runtime
4949
#[precompile_utils::precompile]
5050
impl<Runtime, WeightInfo> RelayDataVerifierPrecompile<Runtime, WeightInfo>
5151
where
52-
Runtime: frame_system::Config
53-
+ pallet_relay_storage_roots::Config
54-
+ pallet_evm::Config
55-
+ pallet_precompile_benchmarks::Config,
52+
Runtime: frame_system::Config + pallet_relay_storage_roots::Config + pallet_evm::Config,
5653
WeightInfo: TWeightInfo,
5754
{
5855
/// Verify the storage entry using the provided relay block number and proof. Return the value

runtime/moonbase/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,7 @@ impl pallet_relay_storage_roots::Config for Runtime {
14031403
type WeightInfo = moonbase_weights::pallet_relay_storage_roots::WeightInfo<Runtime>;
14041404
}
14051405

1406+
#[cfg(feature = "runtime-benchmarks")]
14061407
impl pallet_precompile_benchmarks::Config for Runtime {
14071408
type WeightInfo = moonbase_weights::pallet_precompile_benchmarks::WeightInfo<Runtime>;
14081409
}
@@ -1490,7 +1491,10 @@ construct_runtime! {
14901491
AsyncBacking: pallet_async_backing::{Pallet, Storage} = 50,
14911492
MoonbeamLazyMigrations: pallet_moonbeam_lazy_migrations::{Pallet, Call, Storage} = 51,
14921493
RelayStorageRoots: pallet_relay_storage_roots::{Pallet, Storage} = 52,
1494+
1495+
#[cfg(feature = "runtime-benchmarks")]
14931496
PrecompileBenchmarks: pallet_precompile_benchmarks::{Pallet} = 53,
1497+
14941498
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>} = 54,
14951499
EmergencyParaXcm: pallet_emergency_para_xcm::{Pallet, Call, Storage, Event} = 55,
14961500
EvmForeignAssets: pallet_moonbeam_foreign_assets::{Pallet, Call, Storage, Event<T>} = 56,

runtime/moonbeam/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,7 @@ impl pallet_relay_storage_roots::Config for Runtime {
13841384
type WeightInfo = moonbeam_weights::pallet_relay_storage_roots::WeightInfo<Runtime>;
13851385
}
13861386

1387+
#[cfg(feature = "runtime-benchmarks")]
13871388
impl pallet_precompile_benchmarks::Config for Runtime {
13881389
type WeightInfo = moonbeam_weights::pallet_precompile_benchmarks::WeightInfo<Runtime>;
13891390
}
@@ -1499,7 +1500,7 @@ construct_runtime! {
14991500
// Utils
15001501
RelayStorageRoots: pallet_relay_storage_roots::{Pallet, Storage} = 112,
15011502

1502-
// TODO should not be included in production
1503+
#[cfg(feature = "runtime-benchmarks")]
15031504
PrecompileBenchmarks: pallet_precompile_benchmarks::{Pallet} = 113,
15041505

15051506
// Randomness

runtime/moonriver/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,7 @@ impl pallet_relay_storage_roots::Config for Runtime {
13891389
type WeightInfo = moonriver_weights::pallet_relay_storage_roots::WeightInfo<Runtime>;
13901390
}
13911391

1392+
#[cfg(feature = "runtime-benchmarks")]
13921393
impl pallet_precompile_benchmarks::Config for Runtime {
13931394
type WeightInfo = moonriver_weights::pallet_precompile_benchmarks::WeightInfo<Runtime>;
13941395
}
@@ -1502,6 +1503,8 @@ construct_runtime! {
15021503

15031504
// Utils
15041505
RelayStorageRoots: pallet_relay_storage_roots::{Pallet, Storage} = 112,
1506+
1507+
#[cfg(feature = "runtime-benchmarks")]
15051508
PrecompileBenchmarks: pallet_precompile_benchmarks::{Pallet} = 113,
15061509

15071510
// Randomness

test/suites/dev/moonbase/test-pov/test-precompile-over-pov2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describeSuite({
7272
});
7373

7474
const { result, block } = await context.createBlock(rawSigned);
75-
expect(block.proofSize).toMatchInlineSnapshot(`109340`);
75+
expect(block.proofSize).toMatchInlineSnapshot(`109307`);
7676
expect(result?.successful).to.equal(true);
7777
},
7878
});

0 commit comments

Comments
 (0)