Questions tagged [configuration]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
78 views

Is it possible to write-access Local Storage from the Node?

My use case is this: an Offchain Worker sends Http requests to certain endpoints. These endpoints are hardcoded on chain under current implementation. I would like to be able to configure those ...
Yury Yukhananov's user avatar
4 votes
2 answers
102 views

What should be the maximum size of a `BoundedVec`?

What is the recommended maximum number of bytes to store within a BoundedVec? I am currently having the following struct: #[derive( parity_scale_codec::Decode, parity_scale_codec::Encode, ...
Chralt's user avatar
  • 543
2 votes
1 answer
60 views

Help configuring the democracy pallet and referenda proposal

This is regarding the democracy pallet and referenda proposal: When submitting the proposal, a deposit needs to be defined where the MinimumDeposit config can be used to set the minimum amount to be ...
Josh's user avatar
  • 415
0 votes
1 answer
31 views

What is the most standard pallet structure in Substrate?

I wonder if there is a structure in pallets, which other projects should follow. We have the following elements: < Config trait > < Types > < Storage > < Genesis info> < ...
Chralt's user avatar
  • 543
0 votes
1 answer
37 views

How is it possible to avoid a mock runtime and use the actual runtime for testing?

I would like to avoid the most pallet config initialisation and just want to use the actual runtime configuration for the (unit) tests. This would simplify my mock process a lot. The only thing that ...
Chralt's user avatar
  • 543
2 votes
1 answer
28 views

How to get the call `authorize_upgrade` from `cumulus_pallet_parachain_system` inside another pallet?

I would like to schedule the dispatch call authorize_upgrade inside a custom pallet. For this I need the call enum variant of the cumulus_pallet_parachain_system pallet. How can I get this? Via the ...
Chralt's user avatar
  • 543
5 votes
0 answers
60 views

How to configure XCMP queue drop threshold?

The XCMP queue drops messages if they exceed the limit: if (count as u32) < drop_threshold { status[i].message_metadata.push((sent_at, format)); } else { debug_assert!( false, ...
apopiak's user avatar
  • 418
2 votes
1 answer
128 views

How to determine how much compute time to allocate

We currently have the expected block time to MILLISECS_PER_BLOCK = 12000. We also set the MAXIMUM_BLOCK_WEIGHT = WEIGHT_PER_SECOND.saturating_div(2) // 500_000_000_000. This seems low, given that we ...
Yatusabes's user avatar
  • 766
3 votes
2 answers
82 views

How to conditionally include an extrinsic with a rustc feature?

Hey Substrate Community, is there a way to annotate a extrinsic call function with the Rust cfg condition compile execution? #[cfg_attr(feature = "with-global-disputes", pallet::weight(T::...
Chralt's user avatar
  • 543
2 votes
1 answer
152 views

How can I set the max byte size extrinsic/transaction?

I will like to play with limiting the max size of transactions? I cannot find in substrate where those configurations go.
Yatusabes's user avatar
  • 766
2 votes
1 answer
106 views

After genesis has occurred how do I configure new pallet with pre-filled storage?

This question is somewhat similar to this question about configuring for testing but it is for an already live chain. In this scenario a new pallet will be added to an existing chain's runtime. The ...
T9b's user avatar
  • 456
1 vote
1 answer
146 views

chainType in custom spec

I would like to know what are the possible values for "chainType": "Live" in the custom spec file, and what is the meaning of each one of them. Also how to use Custom?
katapulte's user avatar
  • 161
2 votes
1 answer
98 views

How to use pallet_timestamp on tests with function run_to_block?

I'm trying to use pallet_timestamp on function run_to_block when testing PalletA. Here is my code pub fn run_to_block(n: u64) { while System::block_number() < n { if System::...
Stefan Muto's user avatar