diff --git a/node/service/src/rpc.rs b/node/service/src/rpc.rs index e4631f92c9..a5b090e5bd 100644 --- a/node/service/src/rpc.rs +++ b/node/service/src/rpc.rs @@ -297,7 +297,7 @@ where fee_history_cache, fee_history_limit, 10, - true, + false, forced_parent_hashes, pending_create_inherent_data_providers, Some(pending_consenus_data_provider), diff --git a/pallets/ethereum-xcm/src/mock.rs b/pallets/ethereum-xcm/src/mock.rs index 06f42084c7..fa5a5a44b6 100644 --- a/pallets/ethereum-xcm/src/mock.rs +++ b/pallets/ethereum-xcm/src/mock.rs @@ -205,7 +205,7 @@ impl pallet_evm::Config for Test { parameter_types! { pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; - pub const AllowUnprotectedTxs: bool = true; + pub const AllowUnprotectedTxs: bool = false; } impl pallet_ethereum::Config for Test { diff --git a/pallets/moonbeam-foreign-assets/src/mock.rs b/pallets/moonbeam-foreign-assets/src/mock.rs index cb5c6f956d..32a355b893 100644 --- a/pallets/moonbeam-foreign-assets/src/mock.rs +++ b/pallets/moonbeam-foreign-assets/src/mock.rs @@ -153,7 +153,7 @@ impl pallet_evm::Config for Test { parameter_types! { pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; - pub const AllowUnprotectedTxs: bool = true; + pub const AllowUnprotectedTxs: bool = false; } impl pallet_ethereum::Config for Test { diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index 3a0b6c6def..9ef54e8e85 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -693,7 +693,7 @@ impl fp_rpc::ConvertTransaction for TransactionConve parameter_types! { pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; - pub const AllowUnprotectedTxs: bool = true; + pub const AllowUnprotectedTxs: bool = false; } impl pallet_ethereum::Config for Runtime { diff --git a/runtime/moonbase/tests/xcm_mock/parachain.rs b/runtime/moonbase/tests/xcm_mock/parachain.rs index 896b7e50d9..a16154d24e 100644 --- a/runtime/moonbase/tests/xcm_mock/parachain.rs +++ b/runtime/moonbase/tests/xcm_mock/parachain.rs @@ -885,7 +885,7 @@ impl xcm_primitives::HrmpEncodeCall for MockHrmpEncoder { parameter_types! { pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; - pub const AllowUnprotectedTxs: bool = true; + pub const AllowUnprotectedTxs: bool = false; } impl pallet_ethereum::Config for Runtime { diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index c7fbc54492..2110d5b570 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -691,7 +691,7 @@ impl fp_rpc::ConvertTransaction for TransactionConve parameter_types! { pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; - pub const AllowUnprotectedTxs: bool = true; + pub const AllowUnprotectedTxs: bool = false; } impl pallet_ethereum::Config for Runtime { diff --git a/runtime/moonbeam/tests/xcm_mock/parachain.rs b/runtime/moonbeam/tests/xcm_mock/parachain.rs index 4d4addb973..00b0dbb881 100644 --- a/runtime/moonbeam/tests/xcm_mock/parachain.rs +++ b/runtime/moonbeam/tests/xcm_mock/parachain.rs @@ -878,7 +878,7 @@ impl xcm_primitives::HrmpEncodeCall for MockHrmpEncoder { parameter_types! { pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; - pub const AllowUnprotectedTxs: bool = true; + pub const AllowUnprotectedTxs: bool = false; } impl pallet_ethereum::Config for Runtime { diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index dd87a580b7..cbd8cd02d4 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -694,7 +694,7 @@ impl fp_rpc::ConvertTransaction for TransactionConve parameter_types! { pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; - pub const AllowUnprotectedTxs: bool = true; + pub const AllowUnprotectedTxs: bool = false; } impl pallet_ethereum::Config for Runtime { diff --git a/runtime/moonriver/tests/xcm_mock/parachain.rs b/runtime/moonriver/tests/xcm_mock/parachain.rs index cdf9add3f2..093b5c75f7 100644 --- a/runtime/moonriver/tests/xcm_mock/parachain.rs +++ b/runtime/moonriver/tests/xcm_mock/parachain.rs @@ -852,7 +852,7 @@ impl xcm_primitives::HrmpEncodeCall for MockHrmpEncoder { parameter_types! { pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; - pub const AllowUnprotectedTxs: bool = true; + pub const AllowUnprotectedTxs: bool = false; } impl pallet_ethereum::Config for Runtime { diff --git a/test/suites/dev/moonbase/test-balance/test-balance-transfer.ts b/test/suites/dev/moonbase/test-balance/test-balance-transfer.ts index 4d8efcb426..026de0bf7f 100644 --- a/test/suites/dev/moonbase/test-balance/test-balance-transfer.ts +++ b/test/suites/dev/moonbase/test-balance/test-balance-transfer.ts @@ -64,9 +64,10 @@ describeSuite({ await context.createBlock(); const rawTx = (await createRawTransfer(context, randomAddress, 512n, { privateKey: CHARLETH_PRIVATE_KEY, - gasPrice: GENESIS_BASE_FEE, + maxFeePerGas: GENESIS_BASE_FEE, + maxPriorityFeePerGas: 0n, gas: 21000n, - txnType: "legacy", + txnType: "eip1559", })) as `0x${string}`; await sendRawTransaction(context, rawTx); @@ -81,17 +82,17 @@ describeSuite({ title: "should decrease from account", test: async function () { const balanceBefore = await context.viem().getBalance({ address: CHARLETH_ADDRESS }); - const fees = 21000n * GENESIS_BASE_FEE; await context.createBlock( await createRawTransfer(context, randomAddress, 512n, { gas: 21000n, - gasPrice: GENESIS_BASE_FEE, - txnType: "legacy", + maxFeePerGas: GENESIS_BASE_FEE, + maxPriorityFeePerGas: 0n, + txnType: "eip1559", privateKey: CHARLETH_PRIVATE_KEY, }) ); const balanceAfter = await context.viem().getBalance({ address: CHARLETH_ADDRESS }); - expect(balanceBefore - balanceAfter - fees).toBe(512n); + expect(balanceBefore - balanceAfter).toBeGreaterThan(512n); }, }); diff --git a/test/suites/dev/moonbase/test-eth-tx/test-test-tx-nonce.ts b/test/suites/dev/moonbase/test-eth-tx/test-test-tx-nonce.ts index 119cd4b4bc..4ab4f3aa55 100644 --- a/test/suites/dev/moonbase/test-eth-tx/test-test-tx-nonce.ts +++ b/test/suites/dev/moonbase/test-eth-tx/test-test-tx-nonce.ts @@ -148,23 +148,16 @@ describeSuite({ abi: fetchCompiledContract("Incrementor").abi, functionName: "incr", }); - const { result } = await context.createBlock( + await context.createBlock( context.createTxn!({ privateKey: BALTATHAR_PRIVATE_KEY, to: incrementorAddress, data, value: 0n, gasLimit: 21000, - txnType: "legacy", + txnType: "eip1559", }) ); - const receipt = await context - .viem() - .getTransactionReceipt({ hash: result!.hash as `0x${string}` }); - const block = await context.viem().getBlock({ blockHash: receipt.blockHash }); - expect(block.transactions.length, "should include the transaction in the block").to.be.eq( - 1 - ); expect( await context.viem().getTransactionCount({ address: BALTATHAR_ADDRESS }), "should increase the sender nonce" diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xtokens.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xtokens.ts index bf00c2e08e..156e4afe3c 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xtokens.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xtokens.ts @@ -236,9 +236,10 @@ describeSuite({ to: PRECOMPILES.Xtokens, value: 0n, data, - txnType: "legacy", + txnType: "eip1559", gas: 500_000n, - gasPrice: BigInt(DEFAULT_TXN_MAX_BASE_FEE), + maxFeePerGas: BigInt(DEFAULT_TXN_MAX_BASE_FEE), + maxPriorityFeePerGas: 0n, privateKey: CHARLETH_PRIVATE_KEY, }); @@ -250,7 +251,7 @@ describeSuite({ expectEVMResult(result!.events, "Succeed"); - const fees = receipt.gasUsed * BigInt(DEFAULT_TXN_MAX_BASE_FEE); + const fees = receipt.gasUsed * receipt.effectiveGasPrice; expect(balBefore - balAfter).to.equal(amountTransferred + fees); await verifyLatestBlockFees(context, amountTransferred); },