Skip to content

Commit 04a9072

Browse files
authored
* update frontier pin * Configure AllowUnprotectedTxs to false * Fix compile error * Temporary allow unprotected txs to not break tests * fix dev tests * fix tracing tests * fix coderabbit suggestion
1 parent 9e38608 commit 04a9072

28 files changed

Lines changed: 142 additions & 153 deletions

File tree

Cargo.lock

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/service/src/rpc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ where
297297
fee_history_cache,
298298
fee_history_limit,
299299
10,
300+
true,
300301
forced_parent_hashes,
301302
pending_create_inherent_data_providers,
302303
Some(pending_consenus_data_provider),

pallets/ethereum-xcm/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ impl<T: Config> Pallet<T> {
365365
base_fee: U256::zero(),
366366
chain_id: 0u64,
367367
is_transactional: true,
368+
allow_unprotected_txs: false,
368369
},
369370
transaction_data.into(),
370371
weight_limit,

pallets/ethereum-xcm/src/mock.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,14 @@ impl pallet_evm::Config for Test {
205205

206206
parameter_types! {
207207
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
208+
pub const AllowUnprotectedTxs: bool = true;
208209
}
209210

210211
impl pallet_ethereum::Config for Test {
211212
type StateRoot = IntermediateStateRoot<<Test as frame_system::Config>::Version>;
212213
type PostLogContent = PostBlockAndTxnHashes;
213214
type ExtraDataLength = ConstU32<30>;
215+
type AllowUnprotectedTxs = AllowUnprotectedTxs;
214216
}
215217

216218
parameter_types! {

pallets/moonbeam-foreign-assets/src/mock.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,14 @@ impl pallet_evm::Config for Test {
153153

154154
parameter_types! {
155155
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
156+
pub const AllowUnprotectedTxs: bool = true;
156157
}
157158

158159
impl pallet_ethereum::Config for Test {
159160
type StateRoot = IntermediateStateRoot<<Test as frame_system::Config>::Version>;
160161
type PostLogContent = PostBlockAndTxnHashes;
161162
type ExtraDataLength = ConstU32<30>;
163+
type AllowUnprotectedTxs = AllowUnprotectedTxs;
162164
}
163165

164166
/// Gets parameters of last `ForeignAssetCreatedHook::on_asset_created` hook invocation

runtime/moonbase/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,13 +693,15 @@ impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConve
693693

694694
parameter_types! {
695695
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
696+
pub const AllowUnprotectedTxs: bool = true;
696697
}
697698

698699
impl pallet_ethereum::Config for Runtime {
699700
type StateRoot =
700701
pallet_ethereum::IntermediateStateRoot<<Runtime as frame_system::Config>::Version>;
701702
type PostLogContent = PostBlockAndTxnHashes;
702703
type ExtraDataLength = ConstU32<30>;
704+
type AllowUnprotectedTxs = AllowUnprotectedTxs;
703705
}
704706

705707
pub struct EthereumXcmEnsureProxy;

runtime/moonbase/tests/xcm_mock/parachain.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,13 +885,15 @@ impl xcm_primitives::HrmpEncodeCall for MockHrmpEncoder {
885885

886886
parameter_types! {
887887
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
888+
pub const AllowUnprotectedTxs: bool = true;
888889
}
889890

890891
impl pallet_ethereum::Config for Runtime {
891892
type StateRoot =
892893
pallet_ethereum::IntermediateStateRoot<<Runtime as frame_system::Config>::Version>;
893894
type PostLogContent = PostBlockAndTxnHashes;
894895
type ExtraDataLength = ConstU32<30>;
896+
type AllowUnprotectedTxs = AllowUnprotectedTxs;
895897
}
896898
parameter_types! {
897899
pub ReservedXcmpWeight: Weight = Weight::from_parts(u64::max_value(), 0);

runtime/moonbeam/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,12 +691,14 @@ impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConve
691691

692692
parameter_types! {
693693
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
694+
pub const AllowUnprotectedTxs: bool = true;
694695
}
695696

696697
impl pallet_ethereum::Config for Runtime {
697698
type StateRoot = pallet_ethereum::IntermediateStateRoot<Self::Version>;
698699
type PostLogContent = PostBlockAndTxnHashes;
699700
type ExtraDataLength = ConstU32<30>;
701+
type AllowUnprotectedTxs = AllowUnprotectedTxs;
700702
}
701703

702704
/// Relay chain slot duration, in milliseconds.

runtime/moonbeam/tests/xcm_mock/parachain.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,13 +878,15 @@ impl xcm_primitives::HrmpEncodeCall for MockHrmpEncoder {
878878

879879
parameter_types! {
880880
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
881+
pub const AllowUnprotectedTxs: bool = true;
881882
}
882883

883884
impl pallet_ethereum::Config for Runtime {
884885
type StateRoot =
885886
pallet_ethereum::IntermediateStateRoot<<Runtime as frame_system::Config>::Version>;
886887
type PostLogContent = PostBlockAndTxnHashes;
887888
type ExtraDataLength = ConstU32<30>;
889+
type AllowUnprotectedTxs = AllowUnprotectedTxs;
888890
}
889891
parameter_types! {
890892
pub ReservedXcmpWeight: Weight = Weight::from_parts(u64::max_value(), 0);

runtime/moonriver/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,13 +694,15 @@ impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConve
694694

695695
parameter_types! {
696696
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
697+
pub const AllowUnprotectedTxs: bool = true;
697698
}
698699

699700
impl pallet_ethereum::Config for Runtime {
700701
type StateRoot =
701702
pallet_ethereum::IntermediateStateRoot<<Runtime as frame_system::Config>::Version>;
702703
type PostLogContent = PostBlockAndTxnHashes;
703704
type ExtraDataLength = ConstU32<30>;
705+
type AllowUnprotectedTxs = AllowUnprotectedTxs;
704706
}
705707

706708
pub struct EthereumXcmEnsureProxy;

0 commit comments

Comments
 (0)