Skip to content

Commit 75f0906

Browse files
Fix tests
1 parent 2e1a426 commit 75f0906

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

runtime/common/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ impl WeightToFeePolynomial for RefTimeToFee {
174174
type Balance = Balance;
175175

176176
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
177-
// Map base extrinsic weight to 1/200 UNIT.
177+
// Map base extrinsic weight to 1/800 UNIT.
178178
let p = UNIT;
179-
let q = 200 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
179+
let q = 800 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
180180

181181
smallvec::smallvec![WeightToFeeCoefficient {
182182
degree: 1,

runtime/common/src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ macro_rules! impl_evm_tests {
421421
#[test]
422422
fn evm_constants_are_correctly() {
423423
assert_eq!(BlockGasLimit::get(), U256::from(20_000_000));
424-
assert_eq!(WeightPerGas::get().ref_time(), 18750);
424+
assert_eq!(WeightPerGas::get().ref_time(), 75000);
425425
}
426426

427427
#[test]

runtime/crab/src/pallets/evm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ frame_support::parameter_types! {
3131
// Restrict the POV size of the Ethereum transactions in the same way as weight limit.
3232
pub BlockPovSizeLimit: u64 = NORMAL_DISPATCH_RATIO * MAX_POV_SIZE as u64;
3333
pub PrecompilesValue: CrabPrecompiles<Runtime> = CrabPrecompiles::<_>::new();
34+
// The compute time has increased to 2s after async backing.
3435
pub WeightPerGas: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(
35-
fp_evm::weight_per_gas(BLOCK_GAS_LIMIT, NORMAL_DISPATCH_RATIO, WEIGHT_MILLISECS_PER_BLOCK),
36+
fp_evm::weight_per_gas(BLOCK_GAS_LIMIT, NORMAL_DISPATCH_RATIO, WEIGHT_MILLISECS_PER_BLOCK * 4),
3637
0
3738
);
3839
// TODO: FIX ME. https://github.com/rust-lang/rust/issues/88581

runtime/darwinia/src/pallets/evm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ frame_support::parameter_types! {
3131
// Restrict the POV size of the Ethereum transactions in the same way as weight limit.
3232
pub BlockPovSizeLimit: u64 = NORMAL_DISPATCH_RATIO * MAX_POV_SIZE as u64;
3333
pub PrecompilesValue: DarwiniaPrecompiles<Runtime> = DarwiniaPrecompiles::<_>::new();
34+
// The compute time has increased to 2s after async backing.
3435
pub WeightPerGas: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(
35-
fp_evm::weight_per_gas(BLOCK_GAS_LIMIT, NORMAL_DISPATCH_RATIO, WEIGHT_MILLISECS_PER_BLOCK),
36+
fp_evm::weight_per_gas(BLOCK_GAS_LIMIT, NORMAL_DISPATCH_RATIO, WEIGHT_MILLISECS_PER_BLOCK * 4),
3637
0
3738
);
3839
// TODO: FIX ME. https://github.com/rust-lang/rust/issues/88581

runtime/pangolin/src/pallets/evm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ frame_support::parameter_types! {
3131
// Restrict the POV size of the Ethereum transactions in the same way as weight limit.
3232
pub BlockPovSizeLimit: u64 = NORMAL_DISPATCH_RATIO * MAX_POV_SIZE as u64;
3333
pub PrecompilesValue: PangolinPrecompiles<Runtime> = PangolinPrecompiles::<_>::new();
34+
// The compute time has increased to 2s after async backing.
3435
pub WeightPerGas: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(
35-
fp_evm::weight_per_gas(BLOCK_GAS_LIMIT, NORMAL_DISPATCH_RATIO, WEIGHT_MILLISECS_PER_BLOCK),
36+
fp_evm::weight_per_gas(BLOCK_GAS_LIMIT, NORMAL_DISPATCH_RATIO, WEIGHT_MILLISECS_PER_BLOCK * 4),
3637
0
3738
);
3839
// TODO: FIX ME. https://github.com/rust-lang/rust/issues/88581

0 commit comments

Comments
 (0)