Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Refactor outbound queue #5

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ impl pallet_message_queue::Config for Runtime {
type ServiceWeight = MessageQueueServiceWeight;
type MessageProcessor = EthereumOutboundQueue;
type QueueChangeHandler = ();
type QueuePausedQuery = ();
type QueuePausedQuery = EthereumOutboundQueue;
type WeightInfo = ();
}

Expand Down Expand Up @@ -530,28 +530,16 @@ impl snowbridge_inbound_queue::Config for Runtime {
MessageToXcm<CreateAssetCall, CreateAssetExecutionFee, SendTokenExecutionFee>;
}

pub const GWEI: u128 = 1_000_000_000;

parameter_types! {
pub const MaxMessagePayloadSize: u32 = 2048;
pub const MaxMessagesPerBlock: u32 = 32;
pub const DeliveryFeePerGas: u128 = 10;
pub const DeliveryRefundPerGas: u128 = 10 * GWEI;
pub const DeliveryReward: u128 = 1000 * GWEI;
}

impl snowbridge_outbound_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Hashing = Keccak256;
type MessageQueue = MessageQueue;
type MaxMessagePayloadSize = MaxMessagePayloadSize;
type MaxMessagesPerBlock = MaxMessagesPerBlock;
type Decimals = ConstU8<12>;
type MaxMessagePayloadSize = ConstU32<2048>;
type MaxMessagesPerBlock = ConstU32<32>;
type OwnParaId = ParachainInfo;
type GasMeter = snowbridge_core::outbound::ConstantGasMeter;
type Balance = Balance;
type DeliveryFeePerGas = DeliveryFeePerGas;
type DeliveryRefundPerGas = DeliveryRefundPerGas;
type DeliveryReward = DeliveryReward;
type WeightToFee = WeightToFee;
type WeightInfo = weights::snowbridge_outbound_queue::WeightInfo<Runtime>;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl<T: frame_system::Config> snowbridge_outbound_queue::WeightInfo for WeightIn
/// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: System Digest (r:1 w:1)
/// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured)
fn commit_messages() -> Weight {
fn commit() -> Weight {
// Proof Size summary in bytes:
// Measured: `1094`
// Estimated: `2579`
Expand All @@ -60,7 +60,7 @@ impl<T: frame_system::Config> snowbridge_outbound_queue::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().writes(1_u64))
}

fn commit_one_message() -> Weight {
fn commit_single() -> Weight {
// Proof Size summary in bytes:
// Measured: `1094`
// Estimated: `2579`
Expand Down
Loading