pub trait ConfigCircuit: Config {
Show 18 associated items type SelfAccountId: Get<Self::AccountId>; type SelfGatewayId: Get<[u8; 4]>; type SelfParaId: Get<u32>; type XtxTimeoutDefault: Get<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>; type XtxTimeoutCheckInterval: Get<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>; type SFXBiddingPeriod: Get<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>; type DeletionQueueLimit: Get<u32>; type RuntimeEvent: From<Event<Self>> + IsType<Self::RuntimeEvent>; type WeightInfo: WeightInfo; type Balances: Inspect<Self::AccountId> + Mutate<Self::AccountId>; type Currency: Currency<Self::AccountId>; type Xdns: Xdns<Self, <Self::Currency as Currency<Self::AccountId>>::Balance>; type Attesters: AttestersWriteApi<Self::AccountId, DispatchError> + AttestersReadApi<Self::AccountId, <Self::Currency as Currency<Self::AccountId>>::Balance, <<Self::Block as HeaderProvider>::HeaderT as Header>::Number>; type Executors: Executors<Self, <Self::Currency as Currency<Self::AccountId>>::Balance>; type AccountManager: AccountManager<Self::AccountId, <Self::Currency as Currency<Self::AccountId>>::Balance, Self::Hash, <<Self::Block as HeaderProvider>::HeaderT as Header>::Number, u32>; type Portal: Portal<Self>; type SignalQueueDepth: Get<u32>; type TreasuryAccounts: TreasuryAccountProvider<Self::AccountId>;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait. This pallet’s configuration trait

Required Associated Types§

type SelfAccountId: Get<Self::AccountId>

The Circuit’s account id

type SelfGatewayId: Get<[u8; 4]>

The Circuit’s self gateway id

type SelfParaId: Get<u32>

The Circuit’s self parachain id

type XtxTimeoutDefault: Get<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>

The Circuit’s Default Xtx timeout

type XtxTimeoutCheckInterval: Get<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>

The Circuit’s Xtx timeout check interval

type SFXBiddingPeriod: Get<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>

The Circuit’s SFX Bidding Period

type DeletionQueueLimit: Get<u32>

The Circuit’s deletion queue limit - preventing potential delay when queue is too long in on_initialize

type RuntimeEvent: From<Event<Self>> + IsType<Self::RuntimeEvent>

The overarching event type.

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

type Balances: Inspect<Self::AccountId> + Mutate<Self::AccountId>

A type that provides inspection and mutation to some fungible assets

type Currency: Currency<Self::AccountId>

type Xdns: Xdns<Self, <Self::Currency as Currency<Self::AccountId>>::Balance>

A type that provides access to Xdns

type Attesters: AttestersWriteApi<Self::AccountId, DispatchError> + AttestersReadApi<Self::AccountId, <Self::Currency as Currency<Self::AccountId>>::Balance, <<Self::Block as HeaderProvider>::HeaderT as Header>::Number>

type Executors: Executors<Self, <Self::Currency as Currency<Self::AccountId>>::Balance>

type AccountManager: AccountManager<Self::AccountId, <Self::Currency as Currency<Self::AccountId>>::Balance, Self::Hash, <<Self::Block as HeaderProvider>::HeaderT as Header>::Number, u32>

A type that provides access to AccountManager

type Portal: Portal<Self>

A type that gives access to the new portal functionality

type SignalQueueDepth: Get<u32>

The maximum number of signals that can be queued for handling.

When a signal from 3vm is requested, we add it to the queue to be handled by on_initialize

This allows us to process the highest priority and mitigate any race conditions from additional steps.

The reasons for limiting the queue depth are:

  1. The queue is in storage in order to be persistent between blocks. We want to limit the amount of storage that can be consumed.
  2. The queue is stored in a vector and needs to be decoded as a whole when reading it at the end of each block. Longer queues take more weight to decode and hence limit the amount of items that can be deleted per block.

type TreasuryAccounts: TreasuryAccountProvider<Self::AccountId>

Implementors§

source§

impl Config for MiniRuntime

§

type AccountManager = Pallet<MiniRuntime>

§

type Attesters = Pallet<MiniRuntime>

§

type Balances = Pallet<MiniRuntime, ()>

§

type Currency = Pallet<MiniRuntime, ()>

§

type DeletionQueueLimit = ConstU32<100>

§

type Executors = ExecutorsMock<MiniRuntime>

§

type Portal = Pallet<MiniRuntime>

§

type RuntimeEvent = RuntimeEvent

§

type SFXBiddingPeriod = ConstU32<3>

§

type SelfAccountId = CircuitAccountId

§

type SelfGatewayId = SelfGatewayId

§

type SelfParaId = ConstU32<3333>

§

type SignalQueueDepth = ConstU32<5>

§

type TreasuryAccounts = MiniRuntime

§

type WeightInfo = ()

§

type Xdns = Pallet<MiniRuntime>

§

type XtxTimeoutCheckInterval = ConstU32<10>

§

type XtxTimeoutDefault = ConstU32<400>